DCMTK Version 3.7.0 OFFIS DICOM Toolkit

Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
TrcMeasurement Class Reference

Class representing a Measurement within the Tractography Results IOD. More...

Inheritance diagram for TrcMeasurement:

## Classes
class | Values
| Class that holds actual measurement values. More...

## Public Member Functions
virtual | ~TrcMeasurement ()
| Destructor, frees memory.
virtual OFCondition | get (const size_t trackNumber, CodeSequenceMacro &type, CodeSequenceMacro &units, const Float32 *&measurementData, unsigned long &numMeasurementData, const Uint32 *&pointIndices)
| Get measurement data for a selected track. More...
virtual OFCondition | setTrackValues (const size_t trackNumber, const Float32 *measurementValues, const unsigned long &numValues)
| Set measurement values for a single track. More...
virtual OFCondition | setTrackValues (const size_t trackNumber, const Float32 *measurementValues, const unsigned long &numValues, const Uint32 *pointIndices)
| Set measurement values for a single track. More...
virtual OFCondition | read (DcmItem &source, const OFBool clearOldData=OFTrue)
| Read attributes from given item into this class. More...
virtual OFCondition | write (DcmItem &destination)
| Write attributes from this class into given item. More...
virtual OFVector< TrcMeasurement::Values * > & | getValues ()
| Get measurement values for all tracks. More...
virtual CodeSequenceMacro & | getType ()
| Get reference to type of measurement code. More...
virtual CodeSequenceMacro & | getUnits ()
| Get reference to measurement units code. More...
virtual void | resetRules ()
| Resets rules to their original values.
virtual OFString | getName () const
| Get name of component. More...
virtual void | clearData ()
| Clear all data.
virtual OFBool | checkValuesComplete ()
| Check whether measurement values for all tracks are set. More...
Public Member Functions inherited from IODComponent
| IODComponent (OFshared_ptr< DcmItem > item, OFshared_ptr< IODRules > rules, IODComponent *parent=NULL)
| Constructor. More...
| IODComponent (IODComponent *parent=NULL)
| Constructor, creates rules and item from scratch. More...
IODComponent & | operator= (const IODComponent &rhs)
| Assignment operator, copies contained item and rule set from rhs to "this" attribute set. More...
| IODComponent (const IODComponent &rhs)
| Copy constructor, copies reference to contained item and rule set to "this" attribute set. More...
virtual | ~IODComponent ()
| Virtual Destructor.
virtual void | inventMissing ()
| Set missing values by inventing "default values". More...
OFshared_ptr< IODRules > | getRules ()
| Get rules handled by this module. More...
virtual void | makeOptional ()
| Make component optional by turning all attributes requirement types of it to type 3. More...
DcmItem & | getData ()
| Get the data handled by this module. More...
virtual OFCondition | check (const OFBool quiet=OFFalse)
| Check whether this component's data satisfies the underlying rules. More...
virtual int | compare (const IODComponent &rhs) const
| Comparison operator for IOD Components. More...
virtual bool | getValueCheckOnWrite () const
| Get whether attribute value errors will be handled as errors on writing. More...
virtual void | setValueCheckOnWrite (const OFBool checkValue)
| Set whether attribute values should be checked on writing, i.e. More...

## Static Public Member Functions
static OFCondition | create (const CodeSequenceMacro &measurementCode, const CodeSequenceMacro &measurementUnitCodes, TrcMeasurement *&measurement)
| Create TrcMeasurement from minimal data. More...
Static Public Member Functions inherited from IODComponent
static OFCondition | read (DcmItem &source, IODRules &rules, DcmItem &destination, const OFString &componentName)
| Static helper function that reads attributes from given item into destination item, as determined by the provided rules and component name. More...
static OFCondition | write (DcmItem &source, IODRules &rules, DcmItem &destination, const OFString &componentName, const OFBool checkValue)
| Static helper function that writes attributes from given item into destination item, as determined by the provided rules and component name. More...

## Protected Member Functions
| TrcMeasurement ()
| Protected constructor, use create() method to create a new track set.

## Private Attributes
CodeSequenceMacro | m_Type
| Single item from Concept Name Code Sequence (type of measurement)
CodeSequenceMacro | m_Units
| Single item from Measurement Units Code Sequence (units of measurement)
OFVector< TrcMeasurement::Values * > | m_Values
| Items from from Measurement Values Sequence.

## Friends
class | DcmIODUtil
| Allow read/write functions in DcmIODUtil to access class internals.

## Additional Inherited Members
Protected Attributes inherited from IODComponent
OFshared_ptr< DcmItem > | m_Item
| Shared pointer to the data handled by this class. More...
OFshared_ptr< IODRules > | m_Rules
| Rules describing the attributes governed by this class.
IODComponent * | m_Parent
| The parent component (may be NULL) of this class.
OFBool | m_CheckValueOnWrite
| Denotes whether attribute values should be checked on writing, i.e. More...

## Detailed Description

Class representing a Measurement within the Tractography Results IOD.

A measurement provides measurement values for all tracks in the related track set. Measurement values can be defined for all points in a track, or only selected point indices.

## Member Function Documentation

## ◆ checkValuesComplete()

virtual OFBool TrcMeasurement::checkValuesComplete | ( |  | ) |
| virtual

Check whether measurement values for all tracks are set.

Returns
  OFTrue if values are completely present, OFFalse otherwise

## ◆ create()

static OFCondition TrcMeasurement::create | ( | const CodeSequenceMacro & | measurementCode,
|  | const CodeSequenceMacro & | measurementUnitCodes,
|  | TrcMeasurement *& | measurement
| ) |  |
| static

Create TrcMeasurement from minimal data.

Parameters

  measurementCode | Code describing what is measured. Code must be taken from CID 7263 "Diffusion Tractography Measurement Types"
  measurementUnitCodes | Code describing the physical unit measured. Code must taken from CID 82 "Measurement Unit" (based on UCUM)
  measurement | The measurement, if it could be created, NULL otherwise

Returns
  EC_Normal if measurement could be created, error otherwise

## ◆ get()

virtual OFCondition TrcMeasurement::get | ( | const size_t | trackNumber,
|  | CodeSequenceMacro & | type,
|  | CodeSequenceMacro & | units,
|  | const Float32 *& | measurementData,
|  | unsigned long & | numMeasurementData,
|  | const Uint32 *& | pointIndices
| ) |  |
| virtual

Get measurement data for a selected track.

Parameters

  trackNumber | The track whose measurement data should be retrieved
  type | Returns the type of measurement
  units | Returns the units of measurement
  measurementData | Returns the measurement data values
  numMeasurementData | Returns the number of measurement values in measurementData
  pointIndices | Returns the point indices the measurement data values refer to. If they refer to all points in the track, NULL is returned here

Returns
  EC_Normal if measurement could be retrieved, error otherwise.

## ◆ getName()

virtual OFString TrcMeasurement::getName | ( |  | ) | const
| virtual

Get name of component.

Returns
  Name of the module ("MeasurementsSequenceItem")

Implements IODComponent.

## ◆ getType()

virtual CodeSequenceMacro& TrcMeasurement::getType | ( |  | ) |
| virtual

Get reference to type of measurement code.

Returns
  Reference to type of measurement code

## ◆ getUnits()

virtual CodeSequenceMacro& TrcMeasurement::getUnits | ( |  | ) |
| virtual

Get reference to measurement units code.

Returns
  Reference to measurement units code

## ◆ getValues()

virtual OFVector<TrcMeasurement::Values*>& TrcMeasurement::getValues | ( |  | ) |
| virtual

Get measurement values for all tracks.

Returns
  Reference to measurement values for all tracks

## ◆ read()

virtual OFCondition TrcMeasurement::read | ( | DcmItem & | source,
|  | const OFBool | clearOldData = `OFTrue`
| ) |  |
| virtual

Read attributes from given item into this class.

Parameters

  source | The source to read from
  clearOldData | If OFTrue, old data is cleared before reading. Otherwise old data is overwritten (or amended)

Returns
  EC_Normal if reading was successful, error otherwise

Reimplemented from IODComponent.

## ◆ setTrackValues() [1/2]

virtual OFCondition TrcMeasurement::setTrackValues | ( | const size_t | trackNumber,
|  | const Float32 * | measurementValues,
|  | const unsigned long & | numValues
| ) |  |
| virtual

Set measurement values for a single track.

Requires measurement value for all points in the track.

Parameters

  trackNumber | The number of the track to set values for (0 for first track)
  measurementValues | The measurement values
  numValues | Number of measurement values in measurementValues, must be equal to number of values in track.

Returns
  EC_Normal if values could be set, error code otherwise

## ◆ setTrackValues() [2/2]

virtual OFCondition TrcMeasurement::setTrackValues | ( | const size_t | trackNumber,
|  | const Float32 * | measurementValues,
|  | const unsigned long & | numValues,
|  | const Uint32 * | pointIndices
| ) |  |
| virtual

Set measurement values for a single track.

Requires list of indices to those points in track for which the measurement values are defined for.

Parameters

  trackNumber | The number of the track to set values for (0 for first track)
  measurementValues | The measurement values
  numValues | Number of measurement values in measurementValues, must be equal or less to number of values in track.
  pointIndices | Indices of the points in the track that the measurement values apply to. Number of values must be equal to numValues.

Returns
  EC_Normal if values could be set, error code otherwise

## ◆ write()

virtual OFCondition TrcMeasurement::write | ( | DcmItem & | destination | ) |
| virtual

Write attributes from this class into given item.

Parameters

  destination | The item to write to

Returns
  EC_Normal if writing was successful, error otherwise

Reimplemented from IODComponent.

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

- dcmtract/include/dcmtk/dcmtract/trcmeasurement.h

Generated on Mon Dec 15 2025 for DCMTK Version 3.7.0 by Doxygen 1.9.1