DCMTK  Version 3.6.6
OFFIS DICOM Toolkit
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
TrcTractographyResults Class Reference

Class representing an object of the "Tractography Results" object IOD. More...

+ Inheritance diagram for TrcTractographyResults:

Public Member Functions

virtual OFCondition import (const OFString &filename, const OFBool readPatient, const OFBool readStudy, const OFBool readFoR=OFFalse, const OFBool readSeries=OFFalse, const OFBool updateCommonInstanceReferences=OFTrue, const OFBool takeOverCharset=OFTrue)
 CAUTION: Parameter order (readFoR and readSeries) changed, and there is a new parameter "takeOverCharset" which per default takes over the charset from the given source file! Take over general information for Patient, Study, Series and/or Frame of Reference from existing file. More...
 
virtual OFCondition addTrackSet (const OFString &trackSetLabel, const OFString &trackSetDescription, const CodeWithModifiers &anatomyCode, const CodeSequenceMacro &diffusionModelCode, const AlgorithmIdentificationMacro &algoIdentCode, TrcTrackSet *&trackSet)
 Add Track Set to object. More...
 
virtual ~TrcTractographyResults ()
 Destructor, frees memory.
 
virtual OFCondition saveFile (const OFString &filename, const E_TransferSyntax writeXfer=EXS_LittleEndianExplicit)
 Save current object to given filename. More...
 
virtual OFCondition writeDataset (DcmItem &dataset)
 Write current object to given item. More...
 
virtual OFCondition getModality (OFString &value, const signed long pos=0)
 Get Modality (overwrite from DcmIODCommon. More...
 
virtual OFCondition getContentDate (OFString &value, const signed long pos=0)
 Get Content Date (from Tractography Results Module) More...
 
virtual OFCondition getContentTime (OFString &value, const signed long pos=0)
 Get Content Time (from Tractography Results Module) More...
 
virtual IODReferencesgetReferencedInstances ()
 Get referenced instances (from Tractography Results Module) More...
 
virtual IODEnhGeneralEquipmentModulegetEquipment ()
 Get reference to Equipment information. More...
 
virtual ContentIdentificationMacrogetContentIdentification ()
 Return reference to content identification of this Tractography Results object (from Tractography Results Module) More...
 
virtual size_t getNumberOfTrackSets ()
 Returns number of Track Sets in Tractography Results object. More...
 
virtual OFVector< TrcTrackSet * > & getTrackSets ()
 Return Track Sets (from Tractography Results Module) More...
 
- Public Member Functions inherited from DcmIODCommon
 DcmIODCommon ()
 Constructor.
 
 DcmIODCommon (const DcmIODCommon &rhs)
 Copy Constructor. More...
 
OFshared_ptr< IODRulesgetRules ()
 Get rules handled by this IOD. More...
 
OFshared_ptr< DcmItemgetData ()
 Get item managed by this IOD. More...
 
IODPatientModulegetPatient ()
 Get Patient Module. More...
 
IODPatientStudyModulegetPatientStudy ()
 Get Patient Study Module. More...
 
IODGeneralStudyModulegetStudy ()
 Get General Study Module. More...
 
IODGeneralEquipmentModulegetEquipment ()
 Get General Equipment Module. More...
 
IODGeneralSeriesModulegetSeries ()
 Get Series Module. More...
 
IODFoRModulegetFrameOfReference ()
 Get Frame of Reference Module. More...
 
IODSOPCommonModulegetSOPCommon ()
 Get SOP Common Module. More...
 
IODCommonInstanceReferenceModulegetCommonInstanceReference ()
 Get Common Instance Reference Module. More...
 
virtual ~DcmIODCommon ()
 Destructor.
 
virtual void createNewStudy (const OFBool clearEquipment=OFTrue)
 Create new study. More...
 
virtual void createNewSeries (const OFBool clearFoR=OFTrue)
 Create a new series. More...
 
virtual void createNewSOPInstance ()
 Create a new SOP instance. More...
 
virtual void ensureInstanceUIDs (const OFBool correctInvalid=OFFalse)
 Make sure that the IOD contains a SOP Instance, Series Instance and Study Instance UID. More...
 
virtual OFCondition importHierarchy (DcmItem &dataset, const OFBool readPatient, const OFBool readStudy, const OFBool readFoR=OFFalse, const OFBool readSeries=OFFalse, const OFBool takeOverCharset=OFTrue)
 Import common module attributes from dataset but only read Patient, Study, Series and/or Frame of Reference level portions. More...
 
virtual OFCondition importHierarchy (const OFString &filename, const OFBool readPatient, const OFBool readStudy, const OFBool readFoR=OFFalse, const OFBool readSeries=OFFalse, const OFBool takeOverCharset=OFTrue)
 CAUTION: Parameter order (readFoR and readSeries) changed compared to the old import() function. More...
 

Static Public Member Functions

static OFCondition create (const ContentIdentificationMacro &contentIdentification, const OFString &contentDate, const OFString &contentTime, const IODEnhGeneralEquipmentModule::EquipmentInfo &equipment, const IODReferences &imageReferences, TrcTractographyResults *&result)
 Create new Tractography Results object. More...
 
static OFCondition loadFile (const OFString &filename, TrcTractographyResults *&tractography)
 Load Tractography Results object from a file. More...
 
static OFCondition loadDataset (DcmDataset &dataset, TrcTractographyResults *&tractography)
 Load Tractography Results object from dataset object. More...
 

Protected Member Functions

 TrcTractographyResults ()
 Protected default constructor. More...
 
virtual OFCondition read (DcmItem &dataset)
 Overwrites DcmIODCommon::read() More...
 
virtual OFCondition write (DcmItem &dataset)
 Overwrites DcmIODCommon::write() More...
 
virtual void initIODRules ()
 Initialize IOD rules.
 

Private Member Functions

void clearData ()
 Clear old data.
 
OFBool check ()
 Check whether Tractography Results object is ready for writing. More...
 

Static Private Member Functions

static OFCondition loadFile (DcmFileFormat &dcmff, const OFString &filename, DcmDataset *&dset)
 Loads file. More...
 

Private Attributes

IODEnhGeneralEquipmentModule m_EnhancedGeneralEquipmentModule
 Enhanced General Equipment Module.
 
TrcTractographyResultsModule m_TractographyResultsModule
 Tractography Results Module.
 
IODReferences m_References
 References used when creating Tractography Results objects. More...
 

Detailed Description

Class representing an object of the "Tractography Results" object IOD.

Constructor & Destructor Documentation

◆ TrcTractographyResults()

TrcTractographyResults::TrcTractographyResults ( )
protected

Protected default constructor.

Library users should the factory create..() method in order to create an object from scratch

Member Function Documentation

◆ addTrackSet()

virtual OFCondition TrcTractographyResults::addTrackSet ( const OFString trackSetLabel,
const OFString trackSetDescription,
const CodeWithModifiers anatomyCode,
const CodeSequenceMacro diffusionModelCode,
const AlgorithmIdentificationMacro algoIdentCode,
TrcTrackSet *&  trackSet 
)
virtual

Add Track Set to object.

If successful, the resulting Track Set can be filled by calling addTrack() (and other methods) on it.

Parameters
trackSetLabelLabel for this Track Set with a maximum of 256 characters (VR = LO)
trackSetDescriptionText description for this Track Set with a maximum of 2^32-2 bytes (VR = UT).
anatomyCodeCode describing the anatomy covered by the Track Set. DICOM proposes a code from CID 7710 "Tractography Anatomic Sites" (Baseline). Laterality can be set later on the resulting Track Set.
diffusionModelCodeCode describing the diffusion model this Track Set is based on. DICOM proposes a code from CID 7261 "Diffusion Model Value Types"
algoIdentCodeCode describing the algorithm identification. DICOM prescribes code from CID 7262 "Diffusion Tractography Algorithm Families". A trackset can contain more than one algorithm description. If you want to add more than one description macro, use getTrackSets()->getTrackingAlgorithmIdentification() and add as many as needed to the returned vector.
trackSetReturns the resulting Track Set if successful, NULL otherwise.
Returns
EC_Normal if creation was successful, error otherwise

◆ check()

OFBool TrcTractographyResults::check ( )
private

Check whether Tractography Results object is ready for writing.

Returns
OFTrue, if object can be written, OFFalse otherwise

◆ create()

static OFCondition TrcTractographyResults::create ( const ContentIdentificationMacro contentIdentification,
const OFString contentDate,
const OFString contentTime,
const IODEnhGeneralEquipmentModule::EquipmentInfo equipment,
const IODReferences imageReferences,
TrcTractographyResults *&  result 
)
static

Create new Tractography Results object.

The resulting object then can be filled by using addTrackSet(). The memory of the resulting Tractography Results object has to be freed by the caller.

Parameters
contentIdentificationContent identification for this object
contentDateThe date the content creation started
contentTimeThe time the content creation started
equipmentEquipment used to produce this object
imageReferencesReferences to images that played a role when creating this object. Usually these are MR images that were used to compute the tracks in this object.
resultReturns the created object if successful, otherwise NULL
Returns
EC_Normal if creation was successful, error otherwise

◆ getContentDate()

virtual OFCondition TrcTractographyResults::getContentDate ( OFString value,
const signed long  pos = 0 
)
virtual

Get Content Date (from Tractography Results Module)

Parameters
valueReference to variable in which the value should be stored
posIndex of the value to get (0..vm-1), -1 for all components
Returns
EC_Normal if successful, an error code otherwise

◆ getContentIdentification()

virtual ContentIdentificationMacro& TrcTractographyResults::getContentIdentification ( )
virtual

Return reference to content identification of this Tractography Results object (from Tractography Results Module)

Returns
Reference to content identification data

◆ getContentTime()

virtual OFCondition TrcTractographyResults::getContentTime ( OFString value,
const signed long  pos = 0 
)
virtual

Get Content Time (from Tractography Results Module)

Parameters
valueReference to variable in which the value should be stored
posIndex of the value to get (0..vm-1), -1 for all components
Returns
EC_Normal if successful, an error code otherwise

◆ getEquipment()

virtual IODEnhGeneralEquipmentModule& TrcTractographyResults::getEquipment ( )
virtual

Get reference to Equipment information.

Returns
Reference to information from Enhanced General Equipment Module

◆ getModality()

virtual OFCondition TrcTractographyResults::getModality ( OFString value,
const signed long  pos = 0 
)
inlinevirtual

Get Modality (overwrite from DcmIODCommon.

DICOM enforces "MR" for Tractography Result objects, and thus it is always returned.

Parameters
valueReference to variable in which the value should be stored
posIndex of the value to get. Not evaluated (here for consistency with other setter functions).
Returns
status, EC_Normal if successful, an error code otherwise

References EC_Normal.

◆ getNumberOfTrackSets()

virtual size_t TrcTractographyResults::getNumberOfTrackSets ( )
virtual

Returns number of Track Sets in Tractography Results object.

Returns
Number of Track Sets in object

◆ getReferencedInstances()

virtual IODReferences& TrcTractographyResults::getReferencedInstances ( )
virtual

Get referenced instances (from Tractography Results Module)

Returns
Reference to instances referenced in Referenced Instance Sequence

◆ getTrackSets()

virtual OFVector<TrcTrackSet*>& TrcTractographyResults::getTrackSets ( )
virtual

Return Track Sets (from Tractography Results Module)

Returns
Reference to Track Sets

◆ import()

virtual OFCondition TrcTractographyResults::import ( const OFString filename,
const OFBool  readPatient,
const OFBool  readStudy,
const OFBool  readFoR = OFFalse,
const OFBool  readSeries = OFFalse,
const OFBool  updateCommonInstanceReferences = OFTrue,
const OFBool  takeOverCharset = OFTrue 
)
virtual

CAUTION: Parameter order (readFoR and readSeries) changed, and there is a new parameter "takeOverCharset" which per default takes over the charset from the given source file! Take over general information for Patient, Study, Series and/or Frame of Reference from existing file.

Parameters
filenameThe filename to read from
readPatientIf OFTrue, Patient level information is imported
readStudyIf OFTrue, Study level information is imported
readFoRIf OFTrue, Frame of Reference information is imported
readSeriesIf OFTrue, Series level information is imported; if OFTrue, readFoR is also set to OFTrue.
updateCommonInstanceReferencesIf OFTrue (default), all references in the Common Instance Reference Module will be updated using the reference data provided earlier in the create() call. The reason is that the study and series information (including UIDs) are likely to change during this call, which requires another sorting of references inside the Common Instance Reference module.
takeOverCharsetIf OFTrue (default), Specific Character Set is taken over from imported dataset. If it's not present or empty (invalid), the attribute will not be present in this class either.
Returns
EC_Normal if reading was successful (i.e. if any information could be read), otherwise an error is returned

◆ loadDataset()

static OFCondition TrcTractographyResults::loadDataset ( DcmDataset dataset,
TrcTractographyResults *&  tractography 
)
static

Load Tractography Results object from dataset object.

The memory of the resulting Tractography Results object has to be freed by the caller.

Parameters
datasetThe dataset to read from
tractographyThe resulting Tractography Results object. NULL if dataset could not be read successfully.
Returns
EC_Normal if reading was successful, error otherwise

◆ loadFile() [1/2]

static OFCondition TrcTractographyResults::loadFile ( const OFString filename,
TrcTractographyResults *&  tractography 
)
static

Load Tractography Results object from a file.

The memory of the resulting Tractography Results object has to be freed by the caller.

Parameters
filenameThe file to read from
tractographyThe resulting Tractography Results object. NULL if dataset could not be read successfully.
Returns
EC_Normal if reading was successful, error otherwise

◆ loadFile() [2/2]

static OFCondition TrcTractographyResults::loadFile ( DcmFileFormat dcmff,
const OFString filename,
DcmDataset *&  dset 
)
staticprivate

Loads file.

Parameters
dcmffThe file format to load into
filenameThe filename of the file to load
dsetPointer to dataset after loading
Returns
EC_Normal if loading was successful, error otherwise

◆ read()

virtual OFCondition TrcTractographyResults::read ( DcmItem dataset)
protectedvirtual

Overwrites DcmIODCommon::read()

Parameters
datasetThe dataset to read from
Returns
EC_Normal if reading succeeded, error otherwise

Reimplemented from DcmIODCommon.

◆ saveFile()

virtual OFCondition TrcTractographyResults::saveFile ( const OFString filename,
const E_TransferSyntax  writeXfer = EXS_LittleEndianExplicit 
)
virtual

Save current object to given filename.

Parameters
filenameThe file to write to
writeXferThe transfer syntax to be used
Returns
EC_Normal if writing was successful, error otherwise.

◆ write()

virtual OFCondition TrcTractographyResults::write ( DcmItem dataset)
protectedvirtual

Overwrites DcmIODCommon::write()

Parameters
datasetThe dataset to write to
Returns
EC_Normal if writing succeeded, error otherwise

Reimplemented from DcmIODCommon.

◆ writeDataset()

virtual OFCondition TrcTractographyResults::writeDataset ( DcmItem dataset)
virtual

Write current object to given item.

Parameters
datasetThe item to write to
Returns
EC_Normal if writing was successful, error otherwise.

Member Data Documentation

◆ m_References

IODReferences TrcTractographyResults::m_References
private

References used when creating Tractography Results objects.

When calling create() in order to create a Tractography Results object, the references provided in the call are used to initialize those in the Common Instance Reference Module as well as the Tractography Results module's Referenced Instance Sequence. However, in the case of Common Instance Reference, the internal reference structure is distinguishes between reference within the same study as "this" object as well as other objects outside this study. If the user calls later importHierarchy() after creation, the study is most likely to change (away from the automatically created new study when calling create() to the imported study information) which requires to re-build the Common Instance Refernence Module's references. Thus, this member is used to store store the references provided by create() for this use case.


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


Generated on Thu Jan 14 2021 for DCMTK Version 3.6.6 by Doxygen 1.8.18