22class DicomSegmentItemImageBase;
37 enum { NumberOfSegmentAlgorithmTypes = 3 };
40 static const char *
const SegmentAlgorithmTypeStrings[NumberOfSegmentAlgorithmTypes];
Pure virtual base class describing an abstract image type to be read/written as DICOM SEG image as it...
Class implementing a segmentation item according to the DICOM Segmentation Image Modul as described i...
static size_t getNumCodedLinesPerItem(const std::string &codedFirstLine)
Tries to determine the number of coded string lines per item from the from the first line of a coded ...
SegmentAlgorithmType
Types of algorithms how the segment was calculated, according to the DICOM standard.
@ SEMIAUTOMATIC
calculated segment with user assistance
DicomSegmentItem(unsigned int segNumber=1u, const std::string &segLabel="", const std::string &segDescription="", SegmentAlgorithmType segAlgorithmType=MANUAL, const std::string &segAlgorithmName="", const Vector3 &recommDisplayCIELabValue=Vector3(100.0, 0.0052605, -0.0104082), const double segImageValueRangeMin=0.999, const double segImageValueRangeMax=ML_DOUBLE_MAX)
Default constructor creating a dummy segment with number 1, empty label and description,...
static std::string setUpSegmentSequenceFromLines(std::vector< std::string > &inputLines, std::vector< DicomSegmentItem > &resultItems)
Tries to convert the coded string lines from inputLines to a valid list of DicomSegmentItems; an empt...
double segmentImageValueRangeMax
Upper border of range in which values are considered as part of the segment; not stored in DICOM file...
std::string segmentLabel
Label of the segment.
void setFromBase64CodedString(const std::string &codedItem)
Return the content of the item as a composition of Base64 coded strings.
SegmentAlgorithmType segmentAlgorithmType
Segment algorithm type (AUTOMATIC, SEMIAUTOMATIC, MANUAL), currently only MANUAL.
std::string getAsBase64CodedString() const
Return the content of the item as a composition of Base64 coded strings.
virtual const DicomSegmentItemImageBase * getSegmentItemImage()
Return a shared pointer to the image stored for this segment item; its type can be identified via get...
std::string getAlgorithmTypeAsString() const
Get algorithm type as string.
virtual ~DicomSegmentItem()
Virtual destructor.
Vector3 recommendedDisplayCIELabValue
Recommended Display CIELab value defining the color of the segment.
std::string segmentAlgorithmName
Name of the segmentation algorithm used to create the segment if segmentAlgorithmType is not MANUAL.
unsigned int segmentNumber
Number of the segment, must be >= 1 when added as tag; if 0 then number must be generated automatical...
static std::string getVersionNumber(const std::string &codedFirstLine)
Tries to determine the file version number from the first line of a coded item or item list and retur...
double segmentImageValueRangeMin
Lower border of range in which values are considered as part of the segment; not stored in DICOM file...
std::string segmentDescription
Description of the segment.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
std::vector< DicomSegmentItem > DicomSegmentItemVector
Type describing a sequence of SegmentItems similar to its description in the DICOM standard under SEG...