MeVisLab Toolbox Reference
|
Class implementing a segmentation item according to the DICOM Segmentation Image Modul as described in the DICOM standard under SEGMENTATION IMAGE MODULE ATTRIBUTES. More...
#include <mlDicomSegmentItem.h>
Public Types | |
enum | SegmentAlgorithmType { AUTOMATIC = 0 , SEMIAUTOMATIC , MANUAL } |
Types of algorithms how the segment was calculated, according to the DICOM standard. More... | |
enum | { NumberOfSegmentAlgorithmTypes = 3 } |
Number of available segmentation algorithm types. More... | |
Public Member Functions | |
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, and MANUAL algorithm and a nearly white CIELabDefault value. More... | |
virtual | ~DicomSegmentItem () |
Virtual destructor. More... | |
std::string | getAlgorithmTypeAsString () const |
Get algorithm type as string. More... | |
virtual const DicomSegmentItemImageBase * | getSegmentItemImage () |
Return a shared pointer to the image stored for this segment item; its type can be identified via getImageType() if pointer is not nullptr. More... | |
std::string | getAsBase64CodedString () const |
Return the content of the item as a composition of Base64 coded strings. More... | |
void | setFromBase64CodedString (const std::string &codedItem) |
Return the content of the item as a composition of Base64 coded strings. More... | |
Static Public Member Functions | |
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 returns the non empty version on success, otherwise an empty string. More... | |
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 item or item list and returns a non zero number of lines on success, otherwise 0 is returned. More... | |
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 empty inputLines vector will lead error free to an empty resultItems vector. More... | |
Public Attributes | |
unsigned int | segmentNumber |
Number of the segment, must be >= 1 when added as tag; if 0 then number must be generated automatically when segment tags are added to DICOM tree. More... | |
std::string | segmentLabel |
Label of the segment. More... | |
std::string | segmentDescription |
Description of the segment. More... | |
SegmentAlgorithmType | segmentAlgorithmType |
Segment algorithm type (AUTOMATIC, SEMIAUTOMATIC, MANUAL), currently only MANUAL. More... | |
std::string | segmentAlgorithmName |
Name of the segmentation algorithm used to create the segment if segmentAlgorithmType is not MANUAL. More... | |
Vector3 | recommendedDisplayCIELabValue |
Recommended Display CIELab value defining the color of the segment. More... | |
double | segmentImageValueRangeMin |
Lower border of range in which values are considered as part of the segment; not stored in DICOM file. More... | |
double | segmentImageValueRangeMax |
Upper border of range in which values are considered as part of the segment; not stored in DICOM file. More... | |
Static Public Attributes | |
static const char *const | SegmentAlgorithmTypeStrings [NumberOfSegmentAlgorithmTypes] |
Strings corresponding to the SegmentAlgorithmType. More... | |
Class implementing a segmentation item according to the DICOM Segmentation Image Modul as described in the DICOM standard under SEGMENTATION IMAGE MODULE ATTRIBUTES.
Definition at line 26 of file mlDicomSegmentItem.h.
anonymous enum |
Number of available segmentation algorithm types.
Enumerator | |
---|---|
NumberOfSegmentAlgorithmTypes |
Definition at line 37 of file mlDicomSegmentItem.h.
Types of algorithms how the segment was calculated, according to the DICOM standard.
Enumerator | |
---|---|
AUTOMATIC | calculated segment |
SEMIAUTOMATIC | calculated segment with user assistance |
MANUAL | user-entered segment |
Definition at line 30 of file mlDicomSegmentItem.h.
ml::DicomSegmentItem::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, and MANUAL algorithm and a nearly white CIELabDefault value.
|
virtual |
Virtual destructor.
std::string ml::DicomSegmentItem::getAlgorithmTypeAsString | ( | ) | const |
Get algorithm type as string.
std::string ml::DicomSegmentItem::getAsBase64CodedString | ( | ) | const |
Return the content of the item as a composition of Base64 coded strings.
|
static |
Tries to determine the number of coded string lines per item from the from the first line of a coded item or item list and returns a non zero number of lines on success, otherwise 0 is returned.
|
virtual |
Return a shared pointer to the image stored for this segment item; its type can be identified via getImageType() if pointer is not nullptr.
|
static |
Tries to determine the file version number from the first line of a coded item or item list and returns the non empty version on success, otherwise an empty string.
void ml::DicomSegmentItem::setFromBase64CodedString | ( | const std::string & | codedItem | ) |
Return the content of the item as a composition of Base64 coded strings.
|
static |
Tries to convert the coded string lines from inputLines to a valid list of DicomSegmentItems; an empty inputLines vector will lead error free to an empty resultItems vector.
inputLines | The string lines containing coded Dicom Segement Items. |
resultItems | The vector of decoded DicomSegmentItems on successful conversion or empty otherwise. |
Vector3 ml::DicomSegmentItem::recommendedDisplayCIELabValue |
Recommended Display CIELab value defining the color of the segment.
Definition at line 73 of file mlDicomSegmentItem.h.
std::string ml::DicomSegmentItem::segmentAlgorithmName |
Name of the segmentation algorithm used to create the segment if segmentAlgorithmType is not MANUAL.
Definition at line 70 of file mlDicomSegmentItem.h.
SegmentAlgorithmType ml::DicomSegmentItem::segmentAlgorithmType |
Segment algorithm type (AUTOMATIC, SEMIAUTOMATIC, MANUAL), currently only MANUAL.
Definition at line 67 of file mlDicomSegmentItem.h.
|
static |
Strings corresponding to the SegmentAlgorithmType.
Definition at line 40 of file mlDicomSegmentItem.h.
std::string ml::DicomSegmentItem::segmentDescription |
Description of the segment.
Definition at line 64 of file mlDicomSegmentItem.h.
double ml::DicomSegmentItem::segmentImageValueRangeMax |
Upper border of range in which values are considered as part of the segment; not stored in DICOM file.
Definition at line 79 of file mlDicomSegmentItem.h.
double ml::DicomSegmentItem::segmentImageValueRangeMin |
Lower border of range in which values are considered as part of the segment; not stored in DICOM file.
Definition at line 76 of file mlDicomSegmentItem.h.
std::string ml::DicomSegmentItem::segmentLabel |
Label of the segment.
Definition at line 61 of file mlDicomSegmentItem.h.
unsigned int ml::DicomSegmentItem::segmentNumber |
Number of the segment, must be >= 1 when added as tag; if 0 then number must be generated automatically when segment tags are added to DICOM tree.
Definition at line 58 of file mlDicomSegmentItem.h.