MeVisLab Toolbox Reference
ml::DicomIODsCreate Namespace Reference

Namespace containing a number of tool function interfaces to create DICOM IODs as tag sets. More...

Functions

ML_MLToDicomTools_EXPORT std::string appendSOPCommonModuleTags (DCMTree::TreePtr resultTree, const std::string &SOPClassUID, const std::string &SOPInstanceUID)
 Appends required DICOM tags to resultTree according to DICOM standard, C.12.1, SOP Common Module. More...
 
ML_MLToDicomTools_EXPORT std::string appendContentIdentificationMacroTags (DCMTree::TreePtr resultTree, const std::string &instanceNumber, const std::string &contentLabel, const std::string &contentDescription="", const std::string &contentCreatorsName="")
 Appends required DICOM tags to resultTree according to DICOM standard, 10.9, Content Identification Macro. More...
 
ML_MLToDicomTools_EXPORT std::string appendPatientModuleTags (DCMTree::TreePtr resultTree, const std::string &patientsName, const std::string &patientID, const std::string &patientBirthDate, const std::string &patientSexString)
 Appends required DICOM tags to resultTree according to DICOM standard, C.7.1.1, Patient Module Module Attributes. More...
 
ML_MLToDicomTools_EXPORT std::string appendGeneralStudyModuleTags (DCMTree::TreePtr resultTree, const std::string &studyInstanceUID, const std::string &studyDate, const std::string &studyTime, const std::string &referringPhysicianName, const std::string &studyID, const std::string &accessionNumber, const std::string &studyDescription)
 Appends required DICOM tags to resultTree according to DICOM standard, C.7.1.3, General Study Module Attributes. More...
 
ML_MLToDicomTools_EXPORT std::string appendGeneralSeriesModuleTags (DCMTree::TreePtr resultTree, const std::string &seriesInstanceUID, const std::string &seriesNumber, const std::string &seriesDescription, bool writeLateralityTag=false, const std::string &laterality="", const std::string &modality="", bool writePatientPositionTag=false, const std::string &patientPosition="", bool writeBodyPartExaminedTag=false, const std::string &bodyPartExamined="")
 Appends required DICOM tags to resultTree according to DICOM standard, C.7.3.1, General Series Module Attributes. More...
 
ML_MLToDicomTools_EXPORT std::string appendGeneralEquipmentModuleTags (DCMTree::TreePtr resultTree, const std::string &manufacturer, const std::string &manufacturerModelName, const std::string &deviceSerialNumber, const std::string &softwareVersions)
 Appends required DICOM tags to resultTree according to DICOM standard, C.7.5.1, General Equipment Module Attributes. More...
 
ML_MLToDicomTools_EXPORT std::string appendContentDataTimeModuleTags (DCMTree::TreePtr resultTree, const std::string &contentDate, const std::string &contentTime, const DCMTree::RawTagId dateTagId=DCMTree_ContentDate, const DCMTree::RawTagId timeTagId=DCMTree_ContentTime)
 Appends required DICOM tags ContentData and ContentTime to resultTree, C.7.6.1, General Image Module Attributes. More...
 
ML_MLToDicomTools_EXPORT std::string appendGeneralImageModuleTags (DCMTree::TreePtr resultTree, const std::string &instanceNumber, const std::string &patientOrientation, const std::string &contentDate, const std::string &contentTime, const bool addPatientOrientation=true)
 Appends required DICOM tags to resultTree according to DICOM standard, C.7.6.1, General Image Module Attributes. More...
 
ML_MLToDicomTools_EXPORT std::string appendImagePlaneModuleTags (DCMTree::TreePtr resultTree, const Vector2 &pixelSpacing, const Vector3 &imagePositionPatient, const Vector6 &imageOrientationPatient, double sliceThickness, double sliceLocation)
 Appends required DICOM tags to resultTree according to DICOM standard, C.7.6.2, Image Plane Module Attributes. More...
 
ML_MLToDicomTools_EXPORT std::string appendSCMultiframeImageModuleTags (DCMTree::TreePtr resultTree, const std::string &burnedInAnnotation, double rescaleIntercept, double rescaleSlope, const std::string &rescaleType, bool writeNominalScannedPixelSpacing=false, const Vector2 &nominalScannedPixelSpacing=Vector2(1, 1), bool writeFrameIncrementPointer=false, const std::string &frameIncrementPointer="(0000,0000)")
 Appends required DICOM tags to resultTree according to DICOM standard, C.8.6.3 SC Multi-Frame-image module. More...
 
ML_MLToDicomTools_EXPORT std::string appendReferencedSOPTagUIDs (DCMTree::TreePtr dcmTree, const std::string &referencedSOPClassUID, const std::string &referencedSOPInstanceUID, const std::string &referencedFrameNumber=std::string(), const std::string &referencedSegmentNumber=std::string())
 Add DICOM Standard, 10.8 SOP INSTANCE REFERENCE MACRO-Tags Referenced SOP Class UID, Referenced SOP Instance UID, ReferencedFrameNumber, or ReferencedSegmentNumber to dcmTree if corresponding strings are not empty. More...
 
ML_MLToDicomTools_EXPORT std::string appendSegmentationSeriesModuleAttributesTags (DCMTree::TreePtr dcmTree, MLint seriesNumber)
 Add tags described in DICOM Standard, C.8.20.1: Segmentation Series Module Attributes to dcmTree. More...
 
ML_MLToDicomTools_EXPORT std::string appendCodeSequenceMacroAttributesTags (DCMTree::TreePtr dcmTree, const DCMTree::TagId sequenceTagId, const std::string &sequenceName, const std::string &codeValue, const std::string &codingSchemeDesignator, const std::string &codeMeaning)
 Add a Code Sequence with one entry with Code Sequence Macro Attributes given by the code* parameters. More...
 
ML_MLToDicomTools_EXPORT std::string appendGeneralAnatomyMandatoryMacroAttributesTags (DCMTree::TreePtr dcmTree, const std::string &codeValue, const std::string &codingSchemeDesignator, const std::string &codeMeaning)
 Add General Anatomy Mandatory Macro tags according to DICOM Standard, Table 8.8-1. More...
 
ML_MLToDicomTools_EXPORT std::string appendSegmentItemTags (DCMTree::TreePtr dcmTree, const DicomSegmentItem &segmentItem, unsigned int segmentNumber)
 Add the contents of a segment item to dcmTree according. More...
 
ML_MLToDicomTools_EXPORT std::string appendSegmentSequenceTags (DCMTree::TreePtr dcmTree, const DicomSegmentItemVector &segmentSequenceItems)
 Add all segment items of segmentSequence as SegmentSequence tag to dcmTree by using addSegmentItem. More...
 

Detailed Description

Namespace containing a number of tool function interfaces to create DICOM IODs as tag sets.

These functions create the most mandatory tags required according to the DICOM standard, but not all. Some non required tags are already added.

Function Documentation

◆ appendCodeSequenceMacroAttributesTags()

ML_MLToDicomTools_EXPORT std::string ml::DicomIODsCreate::appendCodeSequenceMacroAttributesTags ( DCMTree::TreePtr  dcmTree,
const DCMTree::TagId  sequenceTagId,
const std::string &  sequenceName,
const std::string &  codeValue,
const std::string &  codingSchemeDesignator,
const std::string &  codeMeaning 
)

Add a Code Sequence with one entry with Code Sequence Macro Attributes given by the code* parameters.

Parameters
dcmTreeThe DICOM tree in which the sequence shall be added.
sequenceTagIdThe TagId of the sequence to be added.
sequenceNameThe textual name of the sequence, currently only used for logging purposes.
codeValueThe Code Value to be set in the sequence item.
codingSchemeDesignatorThe Code Value to be set in the sequence item.
codeMeaningThe Code Meaning to be set in the sequence item.

◆ appendContentDataTimeModuleTags()

ML_MLToDicomTools_EXPORT std::string ml::DicomIODsCreate::appendContentDataTimeModuleTags ( DCMTree::TreePtr  resultTree,
const std::string &  contentDate,
const std::string &  contentTime,
const DCMTree::RawTagId  dateTagId = DCMTree_ContentDate,
const DCMTree::RawTagId  timeTagId = DCMTree_ContentTime 
)

Appends required DICOM tags ContentData and ContentTime to resultTree, C.7.6.1, General Image Module Attributes.

See also appendGeneralImageModuleTags.

◆ appendContentIdentificationMacroTags()

ML_MLToDicomTools_EXPORT std::string ml::DicomIODsCreate::appendContentIdentificationMacroTags ( DCMTree::TreePtr  resultTree,
const std::string &  instanceNumber,
const std::string &  contentLabel,
const std::string &  contentDescription = "",
const std::string &  contentCreatorsName = "" 
)

Appends required DICOM tags to resultTree according to DICOM standard, 10.9, Content Identification Macro.

◆ appendGeneralAnatomyMandatoryMacroAttributesTags()

ML_MLToDicomTools_EXPORT std::string ml::DicomIODsCreate::appendGeneralAnatomyMandatoryMacroAttributesTags ( DCMTree::TreePtr  dcmTree,
const std::string &  codeValue,
const std::string &  codingSchemeDesignator,
const std::string &  codeMeaning 
)

Add General Anatomy Mandatory Macro tags according to DICOM Standard, Table 8.8-1.

◆ appendGeneralEquipmentModuleTags()

ML_MLToDicomTools_EXPORT std::string ml::DicomIODsCreate::appendGeneralEquipmentModuleTags ( DCMTree::TreePtr  resultTree,
const std::string &  manufacturer,
const std::string &  manufacturerModelName,
const std::string &  deviceSerialNumber,
const std::string &  softwareVersions 
)

Appends required DICOM tags to resultTree according to DICOM standard, C.7.5.1, General Equipment Module Attributes.

◆ appendGeneralImageModuleTags()

ML_MLToDicomTools_EXPORT std::string ml::DicomIODsCreate::appendGeneralImageModuleTags ( DCMTree::TreePtr  resultTree,
const std::string &  instanceNumber,
const std::string &  patientOrientation,
const std::string &  contentDate,
const std::string &  contentTime,
const bool  addPatientOrientation = true 
)

Appends required DICOM tags to resultTree according to DICOM standard, C.7.6.1, General Image Module Attributes.

See also appendContentDataTimeModuleTags.

◆ appendGeneralSeriesModuleTags()

ML_MLToDicomTools_EXPORT std::string ml::DicomIODsCreate::appendGeneralSeriesModuleTags ( DCMTree::TreePtr  resultTree,
const std::string &  seriesInstanceUID,
const std::string &  seriesNumber,
const std::string &  seriesDescription,
bool  writeLateralityTag = false,
const std::string &  laterality = "",
const std::string &  modality = "",
bool  writePatientPositionTag = false,
const std::string &  patientPosition = "",
bool  writeBodyPartExaminedTag = false,
const std::string &  bodyPartExamined = "" 
)

Appends required DICOM tags to resultTree according to DICOM standard, C.7.3.1, General Series Module Attributes.

The Modality (0x0008, 0x0060) tag is added only if modality is not empty, otherwise it is ignored. PatientPosition is required for SOP classes

  • CT ("1.2.840.10008.5.1.4.1.1.2")
  • MR ("1.2.840.10008.5.1.4.1.1.4")
  • Enhanced CT ("1.2.840.10008.5.1.4.1.1.2.1")
  • Enhanced MR Image ("1.2.840.10008.5.1.4.1.1.4.1")
  • Enhanced Color MR Image ("1.2.840.10008.5.1.4.1.1.4.3")
  • MR Spectroscopy ("1.2.840.10008.5.1.4.1.1.4.2").

◆ appendGeneralStudyModuleTags()

ML_MLToDicomTools_EXPORT std::string ml::DicomIODsCreate::appendGeneralStudyModuleTags ( DCMTree::TreePtr  resultTree,
const std::string &  studyInstanceUID,
const std::string &  studyDate,
const std::string &  studyTime,
const std::string &  referringPhysicianName,
const std::string &  studyID,
const std::string &  accessionNumber,
const std::string &  studyDescription 
)

Appends required DICOM tags to resultTree according to DICOM standard, C.7.1.3, General Study Module Attributes.

◆ appendImagePlaneModuleTags()

ML_MLToDicomTools_EXPORT std::string ml::DicomIODsCreate::appendImagePlaneModuleTags ( DCMTree::TreePtr  resultTree,
const Vector2 pixelSpacing,
const Vector3 imagePositionPatient,
const Vector6 imageOrientationPatient,
double  sliceThickness,
double  sliceLocation 
)

Appends required DICOM tags to resultTree according to DICOM standard, C.7.6.2, Image Plane Module Attributes.


◆ appendPatientModuleTags()

ML_MLToDicomTools_EXPORT std::string ml::DicomIODsCreate::appendPatientModuleTags ( DCMTree::TreePtr  resultTree,
const std::string &  patientsName,
const std::string &  patientID,
const std::string &  patientBirthDate,
const std::string &  patientSexString 
)

Appends required DICOM tags to resultTree according to DICOM standard, C.7.1.1, Patient Module Module Attributes.

◆ appendReferencedSOPTagUIDs()

ML_MLToDicomTools_EXPORT std::string ml::DicomIODsCreate::appendReferencedSOPTagUIDs ( DCMTree::TreePtr  dcmTree,
const std::string &  referencedSOPClassUID,
const std::string &  referencedSOPInstanceUID,
const std::string &  referencedFrameNumber = std::string(),
const std::string &  referencedSegmentNumber = std::string() 
)

Add DICOM Standard, 10.8 SOP INSTANCE REFERENCE MACRO-Tags Referenced SOP Class UID, Referenced SOP Instance UID, ReferencedFrameNumber, or ReferencedSegmentNumber to dcmTree if corresponding strings are not empty.

◆ appendSCMultiframeImageModuleTags()

ML_MLToDicomTools_EXPORT std::string ml::DicomIODsCreate::appendSCMultiframeImageModuleTags ( DCMTree::TreePtr  resultTree,
const std::string &  burnedInAnnotation,
double  rescaleIntercept,
double  rescaleSlope,
const std::string &  rescaleType,
bool  writeNominalScannedPixelSpacing = false,
const Vector2 nominalScannedPixelSpacing = Vector2(1, 1),
bool  writeFrameIncrementPointer = false,
const std::string &  frameIncrementPointer = "(0000,0000)" 
)

Appends required DICOM tags to resultTree according to DICOM standard, C.8.6.3 SC Multi-Frame-image module.

◆ appendSegmentationSeriesModuleAttributesTags()

ML_MLToDicomTools_EXPORT std::string ml::DicomIODsCreate::appendSegmentationSeriesModuleAttributesTags ( DCMTree::TreePtr  dcmTree,
MLint  seriesNumber 
)

Add tags described in DICOM Standard, C.8.20.1: Segmentation Series Module Attributes to dcmTree.

Parameters
dcmTreeThe DICOM tree in which the tag shall be added.
seriesNumberis recommended to be positive and should not exceed signed 32 bit range.
Returns
An empty string on success, a textual error description otherwise.

◆ appendSegmentItemTags()

ML_MLToDicomTools_EXPORT std::string ml::DicomIODsCreate::appendSegmentItemTags ( DCMTree::TreePtr  dcmTree,
const DicomSegmentItem segmentItem,
unsigned int  segmentNumber 
)

Add the contents of a segment item to dcmTree according.

Parameters
dcmTreeThe DICOM tree to which the tags shall be added.
segmentItemThe item whose members shall be added as DICOM tags to dcmTree.
segmentNumberThe value to be used as segment number if segmentItem.segmentNumber is 0; if it is not 0 then segmentItem.segmentNumber is used and idx is ignored.

◆ appendSegmentSequenceTags()

ML_MLToDicomTools_EXPORT std::string ml::DicomIODsCreate::appendSegmentSequenceTags ( DCMTree::TreePtr  dcmTree,
const DicomSegmentItemVector segmentSequenceItems 
)

Add all segment items of segmentSequence as SegmentSequence tag to dcmTree by using addSegmentItem.

◆ appendSOPCommonModuleTags()

ML_MLToDicomTools_EXPORT std::string ml::DicomIODsCreate::appendSOPCommonModuleTags ( DCMTree::TreePtr  resultTree,
const std::string &  SOPClassUID,
const std::string &  SOPInstanceUID 
)

Appends required DICOM tags to resultTree according to DICOM standard, C.12.1, SOP Common Module.