DCMTK  Version 3.6.3
OFFIS DICOM Toolkit
Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
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. More...
 
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. 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 size_t getTrackData (const Float32 *&data) const
 Get Track Data. More...
 
virtual size_t getNumDataPoints ()
 Get Number of data points.
 
virtual OFBool getRecommendedDisplayCIELabValue (Uint16 &L, Uint16 &a, Uint16 &b)
 Get Recommended Display CIELab Value. More...
 
size_t getRecommendedDisplayCIELabValueList (const Uint16 *&colors)
 Get Recommended Display CIELab Value List. More...
 
TrcTypes::E_TrackColorMode getRecommendedDisplayCIELabMode ()
 Returns the coloring mode, i.e. More...
 
virtual OFCondition setTrackData (const Float32 *trackDataPoints, const size_t numPoints)
 Set Track Data. More...
 
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. 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...
 
IODComponentoperator= (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.
 
void clearData ()
 Clear all attributes from the data that are handled by this module. More...
 
virtual void inventMissing ()
 Set missing values by inventing "default values". More...
 
OFshared_ptr< IODRulesgetRules ()
 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...
 
DcmItemgetData ()
 Get the data handled by this module. More...
 
virtual int compare (const IODComponent &rhs) const
 Comparison operator for IOD Components. More...
 

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

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

Friends

class DcmIODUtil
 

Additional Inherited Members

- Protected Attributes inherited from IODComponent
OFshared_ptr< DcmItemm_Item
 Shared pointer to the data handled by this class. More...
 
OFshared_ptr< IODRulesm_Rules
 Rules describing the attributes governed by this class.
 
IODComponentm_Parent
 The parent component (may be NULL) of this class.
 

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
quietIf 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()

static 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
trackDataPointsThe data points of the track. Each point consists of x,y and z coordinate.
numPointsThe number of data points (i.e. number of coordinates divided by 3!)
colorsOptional 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.
numColorsThe 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.
trackSetReturns the resulting TrcTrack object (NULL in case of any error)
Returns
EC_Normal if Track could be created, error otherwise

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

◆ 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
LReturns L component of CIELab color
aReturns a component of CIELab color
bReturns 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
colorsReturns 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
dataPointer 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
sourceThe source to read from
clearOldDataIf 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
colorsArray of color values to be set, all colors one after another with each color consisting of L, a and b component.
numColorsNumber 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
trackDataPointsArray of values to be set, all points after another with each point consisting of x, y and z component.
numPointsNumber 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
destinationThe 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:


Generated on Mon Feb 5 2018 for DCMTK Version 3.6.3 by Doxygen 1.8.14