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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 

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.

References appendCodeSequenceMacroAttributesTags().

Referenced by appendCodeSequenceMacroAttributesTags().

◆ 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.

References appendContentDataTimeModuleTags().

Referenced by appendContentDataTimeModuleTags().

◆ 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.

References appendContentIdentificationMacroTags().

Referenced by appendContentIdentificationMacroTags().

◆ 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.

References appendGeneralAnatomyMandatoryMacroAttributesTags().

Referenced by appendGeneralAnatomyMandatoryMacroAttributesTags().

◆ 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.

References appendGeneralEquipmentModuleTags().

Referenced by appendGeneralEquipmentModuleTags().

◆ 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.

References appendGeneralImageModuleTags().

Referenced by appendGeneralImageModuleTags().

◆ 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").

References appendGeneralSeriesModuleTags().

Referenced by appendGeneralSeriesModuleTags().

◆ 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.

References appendGeneralStudyModuleTags().

Referenced by appendGeneralStudyModuleTags().

◆ 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.


References appendImagePlaneModuleTags().

Referenced by appendImagePlaneModuleTags().

◆ 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.

References appendPatientModuleTags().

Referenced by appendPatientModuleTags().

◆ 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.

References appendReferencedSOPTagUIDs().

Referenced by appendReferencedSOPTagUIDs().

◆ 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.

References appendSCMultiframeImageModuleTags().

Referenced by appendSCMultiframeImageModuleTags().

◆ 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.

References appendSegmentationSeriesModuleAttributesTags().

Referenced by appendSegmentationSeriesModuleAttributesTags().

◆ 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.

References appendSegmentItemTags().

Referenced by appendSegmentItemTags().

◆ 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.

References appendSegmentSequenceTags().

Referenced by appendSegmentSequenceTags().

◆ 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.

References appendSOPCommonModuleTags().

Referenced by appendSOPCommonModuleTags().