Loading...
Searching...
No Matches
TrcTrack Class Reference

Class representing a Track of of the "Tractography Results" IOD. More...

Inheritance diagram for TrcTrack:

## Public Member Functions

virtual | ~TrcTrack ()
| Destructor, frees memory.
virtual OFString | getName () const
| Get name of component.
virtual void | resetRules ()
| Resets rules to their original values.
virtual void | clearData ()
| Clear all data.
virtual OFCondition | check (const OFBool quiet=OFFalse)
| Check whether this component's data satisfies the underlying rules.
virtual OFCondition | read (DcmItem &source, const OFBool clearOldData=OFTrue)
| Read attributes from given item into this class.
virtual OFCondition | write (DcmItem &destination)
| Write attributes from this class into given item.
virtual size_t | getTrackData (const Float32 *&data) const
| Get Track Data.
virtual size_t | getNumDataPoints ()
| Get Number of data points.
virtual OFBool | getRecommendedDisplayCIELabValue (Uint16 &L, Uint16 &a, Uint16 &b)
| Get Recommended Display CIELab Value.
size_t | getRecommendedDisplayCIELabValueList (const Uint16 *&colors)
| Get Recommended Display CIELab Value List.
TrcTypes::E_TrackColorMode | getRecommendedDisplayCIELabMode ()
| Returns the coloring mode, i.e.
virtual OFCondition | setTrackData (const Float32 *trackDataPoints, const size_t numPoints)
| Set Track Data.
virtual OFCondition | setRecommendedDisplayCIELabValues (const Uint16 *colors, const size_t numColors)
| Set Recommended Display CIELab Value (List) Depending on how many colors are provided, different DICOM is produced when writing the Track later: 0: No color information for this Track is stored (i.e.
Public Member Functions inherited from IODComponent
| IODComponent (OFshared_ptr< DcmItem > item, OFshared_ptr< IODRules > rules, IODComponent *parent=NULL)
| Constructor.
| IODComponent (IODComponent *parent=NULL)
| Constructor, creates rules and item from scratch.
IODComponent & | operator= (const IODComponent &rhs)
| Assignment operator, copies contained item and rule set from rhs to "this" attribute set.
| IODComponent (const IODComponent &rhs)
| Copy constructor, copies reference to contained item and rule set to "this" attribute set.
virtual | ~IODComponent ()
| Virtual Destructor.
virtual void | inventMissing ()
| Set missing values by inventing "default values".
OFshared_ptr< IODRules > | getRules ()
| Get rules handled by this module.
virtual void | makeOptional ()
| Make component optional by turning all attributes requirement types of it to type 3.
DcmItem & | getData ()
| Get the data handled by this module.
virtual int | compare (const IODComponent &rhs) const
| Comparison operator for IOD Components.
virtual bool | getValueCheckOnWrite () const
| Get whether attribute value errors will be handled as errors on writing.
virtual void | setValueCheckOnWrite (const OFBool checkValue)
| Set whether attribute values should be checked on writing, i.e.

## Static Public Member Functions

static OFCondition | create (const Float32 *trackDataPoints, const size_t numPoints, const Uint16 *colors, const size_t numColors, TrcTrack *&trackSet)
| Create TrcTrack object from required data.
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.
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.

## Protected Member Functions

| TrcTrack ()
| Protected constructor, use create() method to create a new track set.
OFBool | fixPointCoordinatesDataVM ()
| Cut off point data in the end if the number of components is not dividable by 3 (each point must have x,y and z component).

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

## Detailed Description

Class representing a Track of of the "Tractography Results" IOD.

This is the data contained in the items of the Track Sequence.

## Member Function Documentation

## check()

virtual OFCondition TrcTrack::check | ( | const OFBool | quiet = OFFalse | ) |

virtual

Check whether this component's data satisfies the underlying rules.

Parameters

  quiet | If OFTrue, not error / warning messages will be produced. Only the returned error code will indicate error or OK. Per default, logging output is produced (OFFalse).

Returns
  EC_Normal if rules are satisfied, error otherwise

Reimplemented from IODComponent.

## create()

OFCondition TrcTrack::create | ( | const Float32 * | trackDataPoints,
|  | const size_t | numPoints,
|  | const Uint16 * | colors,
|  | const size_t | numColors,
|  | TrcTrack *& | trackSet )

static

Create TrcTrack object from required data.

Parameters

  trackDataPoints | The data points of the track. Each point consists of x,y and z coordinate.
  numPoints | The number of data points (i.e. number of coordinates divided by 3!)
  colors | Optional parameter that defines the recommended display colors for all points. Each color is defined in CIELab space, which means "L", "a" and "b" value must be defined for each color. In DICOM, the value range must be 0 <= value <= 65535.
  numColors | The number of colors in the colors parameter (i.e. number of L,a,b components divided by 3!). Alternatively, a single CIELab color can be provided, independent from the number of points in the track. In that case the color is used to color all points in the track. See also setRecommendedDisplayCIELabValues() for more explanations.
  trackSet | Returns the resulting TrcTrack object (NULL in case of any error)

Returns
  EC_Normal if Track could be created, error otherwise

References TrcTrack().

## fixPointCoordinatesDataVM()

OFBool TrcTrack::fixPointCoordinatesDataVM | ( |  | ) |

protected

Cut off point data in the end if the number of components is not dividable by 3 (each point must have x,y and z component).

Returns
  OFTrue if situation is ok (after fixing if applicable), otherwise OFFalse (e.g. in case of an internal error)

## getName()

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

virtual

Get name of component.

Returns
  Name of the module ("TrackSequenceItem")

Implements IODComponent.

## getNumDataPoints()

virtual size_t TrcTrack::getNumDataPoints | ( |  | ) |

virtual

Get Number of data points.

Returns
  The number of data points

## getRecommendedDisplayCIELabMode()

TrcTypes::E_TrackColorMode TrcTrack::getRecommendedDisplayCIELabMode | ( |  | ) |

Returns the coloring mode, i.e.

whether color is defined for all points in the track separately, or defined by a single color for the track, or if the track does not provide color information in which case the Track Set must provide a color (note that this is not checked, though).

Returns
  The coloring mode

## getRecommendedDisplayCIELabValue()

virtual OFBool TrcTrack::getRecommendedDisplayCIELabValue | ( | Uint16 & | L,
|  | Uint16 & | a,
|  | Uint16 & | b )

virtual

Get Recommended Display CIELab Value.

This will only return a result if a single value is defined to color the Track. Otherwise getRecommendedDisplayCIELabValueList() must be used.

Parameters

  L | Returns L component of CIELab color
  a | Returns a component of CIELab color
  b | Returns b component of CIELab color

Returns
  EC_Normal if successful, an error code otherwise

## getRecommendedDisplayCIELabValueList()

size_t TrcTrack::getRecommendedDisplayCIELabValueList | ( | const Uint16 *& | colors | ) |

Get Recommended Display CIELab Value List.

This will only return a result if one color per data point is defined.

Parameters

  colors | Returns list of colors, each consisting of L,a,b components

Returns
  Number of colors (i.e. number of components divided by 3!). If no colors are defined for data points, 0 is returned.

## getTrackData()

virtual size_t TrcTrack::getTrackData | ( | const Float32 *& | data | ) | const

virtual

Get Track Data.

Parameters

  data | Pointer to the point data

Returns
  Returns number of points in the track or 0 if no points could be found.
  EC_Normal if successful, an error code otherwise

## read()

virtual OFCondition TrcTrack::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.

## setRecommendedDisplayCIELabValues()

virtual OFCondition TrcTrack::setRecommendedDisplayCIELabValues | ( | const Uint16 * | colors,
|  | const size_t | numColors )

virtual

Set Recommended Display CIELab Value (List) Depending on how many colors are provided, different DICOM is produced when writing the Track later: 0: No color information for this Track is stored (i.e.

neither "Recommended Display CIELab Value" is set nor "Recommended Display CIELab Value List". Thus there must be a color definition on Track Set level instead. 1: The given color (consisting of L,a,b component) is recommended to be used for coloring every point in this track. This color will got to the element "Recommended Display CIELab value" for this particular track. In that case, the related Track Set must not have any color recommendation. >1: The number of colors must be equal to the number of data points. Each data point color is separately specified. This setting will lead to the element "Recommended Display CIELab Value List" to be written later. The related Track Set must not contain any color recommendation at all in that case. Note that if the third option (>1) is chosen, it must be provided for every track in the related Track Set!

Parameters

  colors | Array of color values to be set, all colors one after another with each color consisting of L, a and b component.
  numColors | Number of colors in array (one point consists of x, y, and z coordinates).

Returns
  EC_Normal if successful, an error code otherwise

## setTrackData()

virtual OFCondition TrcTrack::setTrackData | ( | const Float32 * | trackDataPoints,
|  | const size_t | numPoints )

virtual

Set Track Data.

Parameters

  trackDataPoints | Array of values to be set, all points after another with each point consisting of x, y and z component.
  numPoints | Number of points in array (one point consists of x, y, and z coordinates)

Returns
  EC_Normal if successful, an error code otherwise

## write()

virtual OFCondition TrcTrack::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/trctrack.h

Generated on for DCMTK Version 3.7.0 by Doxygen 1.15.0