Loading...
Searching...
No Matches
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!
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.
virtual | ~TrcTractographyResults ()
| Destructor, frees memory.
virtual OFCondition | saveFile (const OFString &filename, const E_TransferSyntax writeXfer=EXS_LittleEndianExplicit)
| Save current object to given filename.
virtual OFCondition | writeDataset (DcmItem &dataset)
| Write current object to given item.
virtual OFCondition | getModality (OFString &value, const signed long pos=0)
| Get Modality (overwrite from DcmIODCommon.
virtual OFCondition | getContentDate (OFString &value, const signed long pos=0)
| Get Content Date (from Tractography Results Module).
virtual OFCondition | getContentTime (OFString &value, const signed long pos=0)
| Get Content Time (from Tractography Results Module).
virtual IODReferences & | getReferencedInstances ()
| Get referenced instances (from Tractography Results Module).
virtual IODEnhGeneralEquipmentModule & | getEquipment ()
| Get reference to Equipment information.
virtual ContentIdentificationMacro & | getContentIdentification ()
| Return reference to content identification of this Tractography Results object (from Tractography Results Module).
virtual size_t | getNumberOfTrackSets ()
| Returns number of Track Sets in Tractography Results object.
virtual OFVector< TrcTrackSet * > & | getTrackSets ()
| Return Track Sets (from Tractography Results Module).
Public Member Functions inherited from DcmIODCommon
| DcmIODCommon ()
| Constructor.
| DcmIODCommon (const DcmIODCommon &rhs)
| Copy Constructor.
OFshared_ptr< IODRules > | getRules ()
| Get rules handled by this IOD.
OFshared_ptr< DcmItem > | getData ()
| Get item managed by this IOD.
IODPatientModule & | getPatient ()
| Get Patient Module.
IODPatientStudyModule & | getPatientStudy ()
| Get Patient Study Module.
IODGeneralStudyModule & | getStudy ()
| Get General Study Module.
IODGeneralEquipmentModule & | getEquipment ()
| Get General Equipment Module.
IODGeneralSeriesModule & | getSeries ()
| Get Series Module.
IODFoRModule & | getFrameOfReference ()
| Get Frame of Reference Module.
IODSOPCommonModule & | getSOPCommon ()
| Get SOP Common Module.
IODCommonInstanceReferenceModule & | getCommonInstanceReference ()
| Get Common Instance Reference Module.
virtual | ~DcmIODCommon ()
| Destructor.
virtual void | createNewStudy (const OFBool clearEquipment=OFTrue)
| Create new study.
virtual void | createNewSeries (const OFBool clearFoR=OFTrue)
| Create a new series.
virtual void | createNewSOPInstance ()
| Create a new SOP instance.
virtual void | ensureInstanceUIDs (const OFBool correctInvalid=OFFalse)
| Make sure that the IOD contains a SOP Instance, Series Instance and Study Instance UID.
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.
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.
virtual void | setValueCheckOnWrite (const OFBool checkValue)
| Set whether attribute values should be checked on writing, i.e.
virtual OFBool | getValueCheckOnWrite () const
| Get whether attribute value errors will be handled as errors on writing.

## 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.
static OFCondition | loadFile (const OFString &filename, TrcTractographyResults *&tractography)
| Load Tractography Results object from a file.
static OFCondition | loadDataset (DcmDataset &dataset, TrcTractographyResults *&tractography)
| Load Tractography Results object from dataset object.

## Protected Member Functions

| TrcTractographyResults ()
| Protected default constructor.
virtual OFCondition | read (DcmItem &dataset)
| Overwrites DcmIODCommon::read().
virtual OFCondition | write (DcmItem &dataset)
| Overwrites DcmIODCommon::write().
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.

## Static Private Member Functions

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

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

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

Referenced by create(), loadDataset(), and loadFile().

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

  trackSetLabel | Label for this Track Set with a maximum of 256 characters (VR = LO)
  trackSetDescription | Text description for this Track Set with a maximum of 2^32-2 bytes (VR = UT).
  anatomyCode | Code 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.
  diffusionModelCode | Code describing the diffusion model this Track Set is based on. DICOM proposes a code from CID 7261 "Diffusion Model Value Types"
  algoIdentCode | Code 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.
  trackSet | Returns 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()

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

  contentIdentification | Content identification for this object
  contentDate | The date the content creation started
  contentTime | The time the content creation started
  equipment | Equipment used to produce this object
  imageReferences | References 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.
  result | Returns the created object if successful, otherwise NULL

Returns
  EC_Normal if creation was successful, error otherwise

References TrcTractographyResults().

## getContentDate()

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

virtual

Get Content Date (from Tractography Results Module).

Parameters

  value | Reference to variable in which the value should be stored
  pos | Index 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

  value | Reference to variable in which the value should be stored
  pos | Index 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 )

inline virtual

Get Modality (overwrite from DcmIODCommon.

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

Parameters

  value | Reference to variable in which the value should be stored
  pos | Index 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

  filename | The filename to read from
  readPatient | If OFTrue, Patient level information is imported
  readStudy | If OFTrue, Study level information is imported
  readFoR | If OFTrue, Frame of Reference information is imported
  readSeries | If OFTrue, Series level information is imported; if OFTrue, readFoR is also set to OFTrue.
  updateCommonInstanceReferences | If 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.
  takeOverCharset | If 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()

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

  dataset | The dataset to read from
  tractography | The resulting Tractography Results object. NULL if dataset could not be read successfully.

Returns
  EC_Normal if reading was successful, error otherwise

References TrcTractographyResults().

## loadFile() [1/2]

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

  filename | The file to read from
  tractography | The resulting Tractography Results object. NULL if dataset could not be read successfully.

Returns
  EC_Normal if reading was successful, error otherwise

References TrcTractographyResults().

## loadFile() [2/2]

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

static private

Loads file.

Parameters

  dcmff | The file format to load into
  filename | The filename of the file to load
  dset | Pointer to dataset after loading

Returns
  EC_Normal if loading was successful, error otherwise

## read()

virtual OFCondition TrcTractographyResults::read | ( | DcmItem & | dataset | ) |

protected virtual

Overwrites DcmIODCommon::read().

Parameters

  dataset | The 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

  filename | The file to write to
  writeXfer | The transfer syntax to be used

Returns
  EC_Normal if writing was successful, error otherwise.

References EXS_LittleEndianExplicit.

## write()

virtual OFCondition TrcTractographyResults::write | ( | DcmItem & | dataset | ) |

protected virtual

Overwrites DcmIODCommon::write().

Parameters

  dataset | The 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

  dataset | The 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:

- dcmtract/include/dcmtk/dcmtract/trctractographyresults.h

Generated on for DCMTK Version 3.7.0 by Doxygen 1.15.0