Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkMRMLMeasurement Class Referenceabstract

Class for storing well-defined measurement results, using coded entries. More...

#include <Libs/MRML/Core/vtkMRMLMeasurement.h>

Inheritance diagram for vtkMRMLMeasurement:
Inheritance graph
[legend]
Collaboration diagram for vtkMRMLMeasurement:
Collaboration graph
[legend]

Public Types

enum  ComputationResult { NoChange =0, OK, InsufficientInput, InternalError }
 
typedef vtkObject Superclass
 

Public Member Functions

virtual void ClearValue (ComputationResult computationResult=NoChange)
 
virtual void Compute ()=0
 
virtual void Copy (vtkMRMLMeasurement *aEntry)
 Copy one type into another (deep copy) More...
 
virtual void EnabledOff ()
 
virtual void EnabledOn ()
 
std::string GetAsString ()
 Get content of the object as a single machine-readable string. More...
 
virtual const char * GetClassName ()
 
virtual vtkDoubleArray * GetControlPointValues ()
 
virtual vtkCodedEntryGetDerivationCode ()
 
virtual std::string GetDescription ()
 Informal description of the measurement. More...
 
virtual bool GetEnabled ()
 
vtkMRMLNodeGetInputMRMLNode ()
 Get input MRML node used for calculating the measurement. More...
 
virtual int GetLastComputationResult ()
 Get last computation result. More...
 
const char * GetLastComputationResultAsPrintableString ()
 Get last computation result as human-readable string. More...
 
virtual vtkCodedEntryGetMethodCode ()
 
virtual std::string GetName ()
 Measurement name. More...
 
virtual std::string GetPrintFormat ()
 Formatting string for displaying measurement value and units. More...
 
virtual vtkCodedEntryGetQuantityCode ()
 
virtual std::string GetUnits ()
 Measurement unit. More...
 
virtual vtkCodedEntryGetUnitsCode ()
 
virtual double GetValue ()
 Measured quantity value. More...
 
virtual bool GetValueDefined ()
 Value defined flag (whether a computed value has been set or not) More...
 
std::string GetValueWithUnitsAsPrintableString ()
 Get measurement value and units as a single human-readable string. More...
 
virtual void Initialize ()
 Reset state of object. More...
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
void SetControlPointValues (vtkDoubleArray *inputValues)
 Set the per-control point measurement values. More...
 
void SetDerivationCode (vtkCodedEntry *entry)
 Copy content of coded entry. More...
 
virtual void SetDescription (std::string)
 
virtual void SetEnabled (bool)
 Enabled. More...
 
bool SetFromString (const std::string &content)
 
void SetInputMRMLNode (vtkMRMLNode *node)
 Set input MRML node used for calculating the measurement. More...
 
void SetMethodCode (vtkCodedEntry *entry)
 Copy content of coded entry. More...
 
virtual void SetName (std::string)
 
virtual void SetPrintFormat (std::string)
 
void SetQuantityCode (vtkCodedEntry *entry)
 Copy content of coded entry. More...
 
virtual void SetUnits (std::string)
 
void SetUnitsCode (vtkCodedEntry *entry)
 Copy content of coded entry. More...
 
void SetValue (double value)
 
void SetValue (double value, const std::string &units, const std::string &printFormat, int lastComputationResult)
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkMRMLMeasurementSafeDownCast (vtkObject *o)
 

Protected Member Functions

void operator= (const vtkMRMLMeasurement &)
 
 vtkMRMLMeasurement ()
 
 vtkMRMLMeasurement (const vtkMRMLMeasurement &)
 
 ~vtkMRMLMeasurement () override
 

Protected Attributes

vtkDoubleArray * ControlPointValues {nullptr}
 Per-control point measurements. More...
 
vtkCodedEntryDerivationCode {nullptr}
 
std::string Description
 
bool Enabled {true}
 
vtkWeakPointer< vtkMRMLNodeInputMRMLNode
 MRML node used to calculate the measurement. More...
 
ComputationResult LastComputationResult {InsufficientInput}
 
vtkCodedEntryMethodCode {nullptr}
 
std::string Name
 
std::string PrintFormat
 
vtkCodedEntryQuantityCode {nullptr}
 
std::string Units
 
vtkCodedEntryUnitsCode {nullptr}
 
double Value {0.0}
 
bool ValueDefined {false}
 

Detailed Description

Class for storing well-defined measurement results, using coded entries.

This stores all important information about a measurement using standard coded entries. Measurement method, derivation, quantity value, units, etc, can be specified. This is a commonly used concept in DICOM structured reports.

See also
vtkCodedEntry

Definition at line 33 of file vtkMRMLMeasurement.h.

Member Typedef Documentation

◆ Superclass

typedef vtkObject vtkMRMLMeasurement::Superclass

Definition at line 47 of file vtkMRMLMeasurement.h.

Member Enumeration Documentation

◆ ComputationResult

Measurement computation status

See also
LastComputationResult, GetLastComputationResult(), GetLastComputationResultAsString()
Enumerator
NoChange 

can be used to indicate to keep the current value

OK 

success

InsufficientInput 
InternalError 

Definition at line 39 of file vtkMRMLMeasurement.h.

Constructor & Destructor Documentation

◆ vtkMRMLMeasurement() [1/2]

vtkMRMLMeasurement::vtkMRMLMeasurement ( )
protected

◆ ~vtkMRMLMeasurement()

vtkMRMLMeasurement::~vtkMRMLMeasurement ( )
overrideprotected

◆ vtkMRMLMeasurement() [2/2]

vtkMRMLMeasurement::vtkMRMLMeasurement ( const vtkMRMLMeasurement )
protected

Member Function Documentation

◆ ClearValue()

virtual void vtkMRMLMeasurement::ClearValue ( ComputationResult  computationResult = NoChange)
virtual

Clear measured value Note: per-control-point values are not cleared

◆ Compute()

virtual void vtkMRMLMeasurement::Compute ( )
pure virtual

Perform calculation on

See also
InputMRMLNode and store the result internally. The subclasses need to implement this function

Implemented in vtkMRMLStaticMeasurement, vtkMRMLMeasurementAngle, vtkMRMLMeasurementArea, vtkMRMLMeasurementLength, and vtkMRMLMeasurementVolume.

◆ Copy()

virtual void vtkMRMLMeasurement::Copy ( vtkMRMLMeasurement aEntry)
virtual

Copy one type into another (deep copy)

◆ EnabledOff()

virtual void vtkMRMLMeasurement::EnabledOff ( )
virtual

◆ EnabledOn()

virtual void vtkMRMLMeasurement::EnabledOn ( )
virtual

◆ GetAsString()

std::string vtkMRMLMeasurement::GetAsString ( )

Get content of the object as a single machine-readable string.

◆ GetClassName()

virtual const char* vtkMRMLMeasurement::GetClassName ( )
virtual

◆ GetControlPointValues()

virtual vtkDoubleArray* vtkMRMLMeasurement::GetControlPointValues ( )
virtual

◆ GetDerivationCode()

virtual vtkCodedEntry* vtkMRMLMeasurement::GetDerivationCode ( )
virtual

◆ GetDescription()

virtual std::string vtkMRMLMeasurement::GetDescription ( )
virtual

Informal description of the measurement.

◆ GetEnabled()

virtual bool vtkMRMLMeasurement::GetEnabled ( )
virtual

◆ GetInputMRMLNode()

vtkMRMLNode* vtkMRMLMeasurement::GetInputMRMLNode ( )

Get input MRML node used for calculating the measurement.

See also
Execute

◆ GetLastComputationResult()

virtual int vtkMRMLMeasurement::GetLastComputationResult ( )
virtual

Get last computation result.

◆ GetLastComputationResultAsPrintableString()

const char* vtkMRMLMeasurement::GetLastComputationResultAsPrintableString ( )

Get last computation result as human-readable string.

◆ GetMethodCode()

virtual vtkCodedEntry* vtkMRMLMeasurement::GetMethodCode ( )
virtual

◆ GetName()

virtual std::string vtkMRMLMeasurement::GetName ( )
virtual

Measurement name.

◆ GetPrintFormat()

virtual std::string vtkMRMLMeasurement::GetPrintFormat ( )
virtual

Formatting string for displaying measurement value and units.

◆ GetQuantityCode()

virtual vtkCodedEntry* vtkMRMLMeasurement::GetQuantityCode ( )
virtual

◆ GetUnits()

virtual std::string vtkMRMLMeasurement::GetUnits ( )
virtual

Measurement unit.

◆ GetUnitsCode()

virtual vtkCodedEntry* vtkMRMLMeasurement::GetUnitsCode ( )
virtual

◆ GetValue()

virtual double vtkMRMLMeasurement::GetValue ( )
virtual

Measured quantity value.

◆ GetValueDefined()

virtual bool vtkMRMLMeasurement::GetValueDefined ( )
virtual

Value defined flag (whether a computed value has been set or not)

◆ GetValueWithUnitsAsPrintableString()

std::string vtkMRMLMeasurement::GetValueWithUnitsAsPrintableString ( )

Get measurement value and units as a single human-readable string.

◆ Initialize()

virtual void vtkMRMLMeasurement::Initialize ( )
virtual

Reset state of object.

◆ IsA()

virtual int vtkMRMLMeasurement::IsA ( const char *  type)
virtual

◆ IsTypeOf()

static int vtkMRMLMeasurement::IsTypeOf ( const char *  type)
static

◆ operator=()

void vtkMRMLMeasurement::operator= ( const vtkMRMLMeasurement )
protected

◆ PrintSelf()

void vtkMRMLMeasurement::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
override

◆ SafeDownCast()

static vtkMRMLMeasurement* vtkMRMLMeasurement::SafeDownCast ( vtkObject *  o)
static

◆ SetControlPointValues()

void vtkMRMLMeasurement::SetControlPointValues ( vtkDoubleArray *  inputValues)

Set the per-control point measurement values.

◆ SetDerivationCode()

void vtkMRMLMeasurement::SetDerivationCode ( vtkCodedEntry entry)

Copy content of coded entry.

◆ SetDescription()

virtual void vtkMRMLMeasurement::SetDescription ( std::string  )
virtual

◆ SetEnabled()

virtual void vtkMRMLMeasurement::SetEnabled ( bool  )
virtual

Enabled.

◆ SetFromString()

bool vtkMRMLMeasurement::SetFromString ( const std::string &  content)

Set content of the object from a single machine-readable string.

Returns
true on success

◆ SetInputMRMLNode()

void vtkMRMLMeasurement::SetInputMRMLNode ( vtkMRMLNode node)

Set input MRML node used for calculating the measurement.

See also
Execute

◆ SetMethodCode()

void vtkMRMLMeasurement::SetMethodCode ( vtkCodedEntry entry)

Copy content of coded entry.

◆ SetName()

virtual void vtkMRMLMeasurement::SetName ( std::string  )
virtual

◆ SetPrintFormat()

virtual void vtkMRMLMeasurement::SetPrintFormat ( std::string  )
virtual

◆ SetQuantityCode()

void vtkMRMLMeasurement::SetQuantityCode ( vtkCodedEntry entry)

Copy content of coded entry.

◆ SetUnits()

virtual void vtkMRMLMeasurement::SetUnits ( std::string  )
virtual

◆ SetUnitsCode()

void vtkMRMLMeasurement::SetUnitsCode ( vtkCodedEntry entry)

Copy content of coded entry.

◆ SetValue() [1/2]

void vtkMRMLMeasurement::SetValue ( double  value)

◆ SetValue() [2/2]

void vtkMRMLMeasurement::SetValue ( double  value,
const std::string &  units,
const std::string &  printFormat,
int  lastComputationResult 
)

Set quantity value and units with a singel modified event lastComputationResult type is ComputationResult (int type is used for compatibility with Python wrapper)

Member Data Documentation

◆ ControlPointValues

vtkDoubleArray* vtkMRMLMeasurement::ControlPointValues {nullptr}
protected

Per-control point measurements.

Definition at line 163 of file vtkMRMLMeasurement.h.

◆ DerivationCode

vtkCodedEntry* vtkMRMLMeasurement::DerivationCode {nullptr}
protected

Definition at line 157 of file vtkMRMLMeasurement.h.

◆ Description

std::string vtkMRMLMeasurement::Description
protected

Definition at line 154 of file vtkMRMLMeasurement.h.

◆ Enabled

bool vtkMRMLMeasurement::Enabled {true}
protected

Definition at line 149 of file vtkMRMLMeasurement.h.

◆ InputMRMLNode

vtkWeakPointer<vtkMRMLNode> vtkMRMLMeasurement::InputMRMLNode
protected

MRML node used to calculate the measurement.

See also
Execute

Definition at line 169 of file vtkMRMLMeasurement.h.

◆ LastComputationResult

ComputationResult vtkMRMLMeasurement::LastComputationResult {InsufficientInput}
protected

Definition at line 160 of file vtkMRMLMeasurement.h.

◆ MethodCode

vtkCodedEntry* vtkMRMLMeasurement::MethodCode {nullptr}
protected

Definition at line 159 of file vtkMRMLMeasurement.h.

◆ Name

std::string vtkMRMLMeasurement::Name
protected

Definition at line 150 of file vtkMRMLMeasurement.h.

◆ PrintFormat

std::string vtkMRMLMeasurement::PrintFormat
protected

Definition at line 155 of file vtkMRMLMeasurement.h.

◆ QuantityCode

vtkCodedEntry* vtkMRMLMeasurement::QuantityCode {nullptr}
protected

Definition at line 156 of file vtkMRMLMeasurement.h.

◆ Units

std::string vtkMRMLMeasurement::Units
protected

Definition at line 153 of file vtkMRMLMeasurement.h.

◆ UnitsCode

vtkCodedEntry* vtkMRMLMeasurement::UnitsCode {nullptr}
protected

Definition at line 158 of file vtkMRMLMeasurement.h.

◆ Value

double vtkMRMLMeasurement::Value {0.0}
protected

Definition at line 151 of file vtkMRMLMeasurement.h.

◆ ValueDefined

bool vtkMRMLMeasurement::ValueDefined {false}
protected

Definition at line 152 of file vtkMRMLMeasurement.h.


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