STIR  6.2.0
Public Types | Public Member Functions | List of all members
stir::ImagingModality Class Reference

Class for encoding the modality. More...

#include "stir/ImagingModality.h"

Public Types

enum  ImagingModalityValue {
  Unknown, PT, NM, MR,
  CT, US, Optical
}
 enum with possible values (using DICOM naming)
 

Public Member Functions

 ImagingModality (ImagingModalityValue modality_v=Unknown)
 Construct from enum, set string accordingly.
 
 ImagingModality (const std::string &modality_string_v)
 Construct from string, set enum accordingly. More...
 
ImagingModalityValue get_modality () const
 
std::string get_name () const
 Returns name as a standardised string (in DICOM conventions)
 
bool operator== (const ImagingModality &mod) const
 
bool operator!= (const ImagingModality &mod) const
 
bool is_known () const
 
bool is_unknown () const
 

Detailed Description

Class for encoding the modality.

Modality-names follow DICOM conventions, i.e. "PT", "NM", "MR", "CT", "US", "Optical".

Constructor & Destructor Documentation

◆ ImagingModality()

stir::ImagingModality::ImagingModality ( const std::string &  modality_string_v)
inlineexplicit

Construct from string, set enum accordingly.

The argument is first stripped of white-space and converted to lower-case. Then the following are supported:

  • PT: "pt" or "pet"
  • NM: "nm" or "nucmed" or "spect"
  • MR: "mr" or "mri"
  • CT: "ct" or "cat"
  • US: ""us" or "ultrasound" - \c Optical: "optical"
  • else the modality is set to Unknown

The documentation for this class was generated from the following file: