DCMTK  Version 3.6.4
OFFIS DICOM Toolkit
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
FGBase Class Referenceabstract

Abstract base class for deriving specific functional groups. More...

+ Inheritance diagram for FGBase:

Public Member Functions

 FGBase (const DcmFGTypes::E_FGType fgType)
 Constructor, creates new functional group of given type. More...
 
virtual OFCondition check () const =0
 Check whether functional group has valid and complete data. More...
 
virtual OFCondition read (DcmItem &item)=0
 Read functional group from given item. More...
 
virtual OFCondition write (DcmItem &item)=0
 Write functional group to given item. More...
 
virtual DcmFGTypes::E_FGSharedType getSharedType () const =0
 Find out whether functional group is potentially only shared, only per-frame or can be both. More...
 
virtual DcmFGTypes::E_FGType getType () const
 Return the type of this functional group. More...
 
virtual void clearData ()=0
 Clear any data in the group.
 
virtual ~FGBase ()
 Virtual destructor.
 
virtual int compare (const FGBase &rhs) const =0
 Comparison operator that compares the normalized value of this object with a given object of the same type, i.e. the elements within both functional groups (this and rhs parameter) are compared by value! Both objects (this and rhs) need to have the same type (e.g. both FGDerivationImage) to be comparable. More...
 
virtual FGBaseclone () const =0
 Returns a deep copy of this object. More...
 

Protected Member Functions

virtual OFCondition getItemFromFGSequence (DcmItem &source, const DcmTagKey &seqKey, const unsigned long itemNum, DcmItem *&result)
 Get the item containing the payload of a functional group sequence, identified by the functional group's sequence key provided and the desired item number. More...
 
virtual OFCondition createNewFGSequence (DcmItem &destination, const DcmTagKey &seqKey, const unsigned long numItems, DcmItem *&firstItem)
 Create functional group sequence specified by given sequence tag key. More...
 

Private Member Functions

 FGBase ()
 Private default constructor, shall not be used.
 

Private Attributes

DcmFGTypes::E_FGType m_fgType
 The type of the functional group.
 

Detailed Description

Abstract base class for deriving specific functional groups.

Constructor & Destructor Documentation

◆ FGBase()

FGBase::FGBase ( const DcmFGTypes::E_FGType  fgType)

Constructor, creates new functional group of given type.

Parameters
fgTypeThe type of functional group to create

Member Function Documentation

◆ check()

virtual OFCondition FGBase::check ( ) const
pure virtual

◆ clone()

virtual FGBase* FGBase::clone ( ) const
pure virtual

◆ compare()

virtual int FGBase::compare ( const FGBase rhs) const
pure virtual

Comparison operator that compares the normalized value of this object with a given object of the same type, i.e. the elements within both functional groups (this and rhs parameter) are compared by value! Both objects (this and rhs) need to have the same type (e.g. both FGDerivationImage) to be comparable.

This function is used in order to decide whether a functional group already exists, or is new. This is used in particular to find out whether a given functional group can be shared (i.e. the same information already exists as shared functional group) or is different from the same shared group. In that case the shared functional group must be distributed into per-frame functional groups, instead. The exact implementation for implementing the comparison is not relevant. However, it must be a comparison by value.

Parameters
rhsthe right hand side of the comparison
Returns
0 if the object values are equal. -1 if either the value of the first component that does not match is lower in the rhs object, or all compared components match but the rhs component is shorter. Also returned if this type and rhs type (DcmFGTypes::E_FGType) do not match. 1 if either the value of the first component that does not match is greater in the rhs object, or all compared components match but the rhs component is longer.

Implemented in FGDerivationImage, FGUnknown, FGFrameVOILUT, FGUSImageDescription, FGImageDataType, FGPixelMeasures, FGPlaneOrientationVolume, FGPlanePositionVolume, FGPixelValueTransformation, FGFrameAnatomy, FGPlaneOrientationPatient, FGRealWorldValueMapping, FGParametricMapFrameType, FGPlanePosPatient, FGFrameContent, and FGSegmentation.

◆ createNewFGSequence()

virtual OFCondition FGBase::createNewFGSequence ( DcmItem destination,
const DcmTagKey seqKey,
const unsigned long  numItems,
DcmItem *&  firstItem 
)
protectedvirtual

Create functional group sequence specified by given sequence tag key.

Parameters
destinationThe item to put the sequence into
seqKeyThe functional group's tag key
numItemsThe number of items to create within sequence (minus 1). Usually, functional group only contain a single item, i.e. numItems would be set to 0
firstItemReference to the first item the method created
Returns
EC_Normal if creation was successful, error otherwise

◆ getItemFromFGSequence()

virtual OFCondition FGBase::getItemFromFGSequence ( DcmItem source,
const DcmTagKey seqKey,
const unsigned long  itemNum,
DcmItem *&  result 
)
protectedvirtual

Get the item containing the payload of a functional group sequence, identified by the functional group's sequence key provided and the desired item number.

Parameters
sourceThe item to read the sequence from, e.g. item of the Shared Functional Group Sequence
seqKeyThe identifying key of the functional group's sequence
itemNumThe item number to get from that sequence (usually, a functional group has exactly a single item, i.e. the parameter would be set to 0
resultThe item if found, otherwise NULL
Returns
EC_Normal, if specified item could be retrieved, error otherwise

◆ getSharedType()

virtual DcmFGTypes::E_FGSharedType FGBase::getSharedType ( ) const
pure virtual

◆ getType()

virtual DcmFGTypes::E_FGType FGBase::getType ( ) const
virtual

Return the type of this functional group.

Returns
The functional group's type

Reimplemented in FGUnknown.

◆ read()

virtual OFCondition FGBase::read ( DcmItem item)
pure virtual

Read functional group from given item.

Old data is overwritten.

Parameters
itemThe item to read from. This must contain the sequence element that uniquely identifies the functional group.
Returns
EC_Normal if reading was successful, error otherwise

Implemented in FGDerivationImage, FGUnknown, FGSegmentation, FGPlaneOrientationPatient, FGFrameAnatomy, FGPixelValueTransformation, FGPlanePosPatient, FGRealWorldValueMapping, FGPlaneOrientationVolume, FGFrameContent, FGPlanePositionVolume, FGImageDataType, FGPixelMeasures, FGFrameVOILUT, FGParametricMapFrameType, and FGUSImageDescription.

◆ write()

virtual OFCondition FGBase::write ( DcmItem item)
pure virtual

Write functional group to given item.

If the functional group already exists it is overwritten.

Parameters
itemThe item to write to. The method will write the sequence specific for the functional group into the item
Returns
EC_Normal if writing was successful, error otherwise

Implemented in FGDerivationImage, FGUnknown, FGRealWorldValueMapping, FGSegmentation, FGPlaneOrientationPatient, FGPixelValueTransformation, FGFrameAnatomy, FGPlanePosPatient, FGRealWorldValueMapping, FGPlaneOrientationVolume, FGFrameContent, FGPlanePositionVolume, FGImageDataType, FGPixelMeasures, FGFrameVOILUT, FGParametricMapFrameType, and FGUSImageDescription.


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


Generated on Thu Nov 29 2018 for DCMTK Version 3.6.4 by Doxygen 1.8.14