DCMTK  Version 3.7.0
OFFIS DICOM Toolkit
Public Member Functions | List of all members
IODImagePixelVariant<> Class Template Reference

Class representing different pixel modules from the DICOM standard: The class Image Pixel Module, the Floating Point Image Pixel module and the Double Floating Point Image Pixel module. More...

+ Inheritance diagram for IODImagePixelVariant<>:

Public Member Functions

 IODImagePixelVariant ()
 Constructor.
 
template<typename T >
 IODImagePixelVariant (const T &t)
 Constructor, constructs pixel module based on given type. More...
 
 ~IODImagePixelVariant ()
 Destructor.
 
OFString getName () const
 Get name of module. More...
 
IODImagePixelBase::DataType getDataType () const
 Get pixel data type. More...
 
void clearData ()
 Clear data (base class version)
 
OFCondition getSamplesPerPixel (Uint16 &value, const unsigned long pos=0)
 Get Samples per Pixel. More...
 
OFCondition getPhotometricInterpretation (OFString &value, const signed long pos=0)
 Get Photometric Interpretation. More...
 
OFCondition getRows (Uint16 &value, const unsigned long pos=0)
 Get Rows. More...
 
OFCondition getColumns (Uint16 &value, const unsigned long pos=0)
 Get Columns. More...
 
OFCondition getBitsAllocated (Uint16 &value, const unsigned long pos=0)
 Get Bits Allocated. More...
 
OFCondition getPixelAspectRatio (Uint16 &value, const unsigned long pos=0)
 Get Pixel Aspect Ratio. More...
 
OFCondition setRows (const Uint16 value, const OFBool checkValue=OFTrue)
 Set Rows. More...
 
OFCondition setColumns (const Uint16 value, const OFBool checkValue=OFTrue)
 Set Columns. More...
 
OFCondition setPixelAspectRatio (const OFString &verticalPixelSize, const OFString &horizontalPixelSize, const OFBool checkValue=OFTrue)
 Set Pixel Aspect Ratio. More...
 
OFCondition write (DcmItem &dataset)
 Write pixel module base class data to given item. More...
 
OFCondition read (DcmItem &dataset)
 Read pixel module base class data from given item. More...
 
void setValueCheckOnWrite (const OFBool doCheck)
 Set whether attribute values should be checked on writing, i.e. More...
 
- Public Member Functions inherited from OFvariant< OFmonostate, OFVARIADIC_TEMPLATE_PARAMETER_PACK(T)>
 OFvariant ()
 Constructs a variant holding a default constructed value of the first alternative. More...
 
 OFvariant (const OFvariant &rhs)
 Copy constructs a variant holding a copy of the value rhs holds. More...
 
 OFvariant (OFvariant &&rhs)
 Move constructs a variant by moving the value rhs holds. More...
 
 OFvariant (T t)
 Constructs a variant holding the alternative that most closely matches the given argument. More...
 
 ~OFvariant ()
 Destroys the value that the variant currently holds.
 
OFvariantoperator= (const OFvariant &rhs)
 Copy assigns the value rhs holds to *this. More...
 
OFvariantoperator= (OFvariant &&rhs)
 Move assigns the value rhs holds to *this. More...
 
OFvariantoperator= (T t)
 Converts the given argument to one of the alternatives and assigns it to *this. More...
 
size_t index () const
 Get the index of alternative that is currently being held. More...
 

Additional Inherited Members

Detailed Description

template<OFVARIADIC_DECLARE_TEMPLATE_PARAMETER_PACK_WITH_DEFAULTS(T)>
class IODImagePixelVariant<>

Class representing different pixel modules from the DICOM standard: The class Image Pixel Module, the Floating Point Image Pixel module and the Double Floating Point Image Pixel module.

Constructor & Destructor Documentation

◆ IODImagePixelVariant()

template<OFVARIADIC_DECLARE_TEMPLATE_PARAMETER_PACK_WITH_DEFAULTS(T) >
template<typename T >
IODImagePixelVariant<>::IODImagePixelVariant ( const T &  t)
inline

Constructor, constructs pixel module based on given type.

Parameters
tThe Image Pixel Module to be used

Member Function Documentation

◆ getBitsAllocated()

template<OFVARIADIC_DECLARE_TEMPLATE_PARAMETER_PACK_WITH_DEFAULTS(T) >
OFCondition IODImagePixelVariant<>::getBitsAllocated ( Uint16 &  value,
const unsigned long  pos = 0 
)
inline

Get Bits Allocated.

Parameters
valueReference to variable in which the value should be stored
posIndex of the value to get (0..vm-1)
Returns
EC_Normal if successful, an error code otherwise

◆ getColumns()

template<OFVARIADIC_DECLARE_TEMPLATE_PARAMETER_PACK_WITH_DEFAULTS(T) >
OFCondition IODImagePixelVariant<>::getColumns ( Uint16 &  value,
const unsigned long  pos = 0 
)
inline

Get Columns.

Parameters
valueReference to variable in which the value should be stored
posIndex of the value to get (0..vm-1)
Returns
EC_Normal if successful, an error code otherwise

◆ getDataType()

template<OFVARIADIC_DECLARE_TEMPLATE_PARAMETER_PACK_WITH_DEFAULTS(T) >
IODImagePixelBase::DataType IODImagePixelVariant<>::getDataType ( ) const
inline

Get pixel data type.

Returns
The data type of the pixel data

◆ getName()

template<OFVARIADIC_DECLARE_TEMPLATE_PARAMETER_PACK_WITH_DEFAULTS(T) >
OFString IODImagePixelVariant<>::getName ( ) const
inline

Get name of module.

Returns
Name of the actual module (e.g. "ImagePixelModule")

◆ getPhotometricInterpretation()

template<OFVARIADIC_DECLARE_TEMPLATE_PARAMETER_PACK_WITH_DEFAULTS(T) >
OFCondition IODImagePixelVariant<>::getPhotometricInterpretation ( OFString value,
const signed long  pos = 0 
)
inline

Get Photometric Interpretation.

Parameters
valueReference to variable in which the value should be stored
posIndex of the value to get (0..vm-1)
Returns
EC_Normal if successful, an error code otherwise

◆ getPixelAspectRatio()

template<OFVARIADIC_DECLARE_TEMPLATE_PARAMETER_PACK_WITH_DEFAULTS(T) >
OFCondition IODImagePixelVariant<>::getPixelAspectRatio ( Uint16 &  value,
const unsigned long  pos = 0 
)
inline

Get Pixel Aspect Ratio.

Parameters
valueReference to variable in which the value should be stored
posIndex of the value to get (0..vm-1)
Returns
EC_Normal if successful, an error code otherwise

◆ getRows()

template<OFVARIADIC_DECLARE_TEMPLATE_PARAMETER_PACK_WITH_DEFAULTS(T) >
OFCondition IODImagePixelVariant<>::getRows ( Uint16 &  value,
const unsigned long  pos = 0 
)
inline

Get Rows.

Parameters
valueReference to variable in which the value should be stored
posIndex of the value to get (0..vm-1)
Returns
EC_Normal if successful, an error code otherwise

◆ getSamplesPerPixel()

template<OFVARIADIC_DECLARE_TEMPLATE_PARAMETER_PACK_WITH_DEFAULTS(T) >
OFCondition IODImagePixelVariant<>::getSamplesPerPixel ( Uint16 &  value,
const unsigned long  pos = 0 
)
inline

Get Samples per Pixel.

Parameters
valueReference to variable in which the value should be stored
posIndex of the value to get (0..vm-1)
Returns
EC_Normal if successful, an error code otherwise

◆ read()

template<OFVARIADIC_DECLARE_TEMPLATE_PARAMETER_PACK_WITH_DEFAULTS(T) >
OFCondition IODImagePixelVariant<>::read ( DcmItem dataset)
inline

Read pixel module base class data from given item.

Parameters
datasetThe item to read from (usually dataset level)
Returns
EC_Normal if successful, error otherwise

◆ setColumns()

template<OFVARIADIC_DECLARE_TEMPLATE_PARAMETER_PACK_WITH_DEFAULTS(T) >
OFCondition IODImagePixelVariant<>::setColumns ( const Uint16  value,
const OFBool  checkValue = OFTrue 
)
inline

Set Columns.

Parameters
valueReference to variable in which the value should be stored
checkValueCheck 'value'. Not evaluated (here for consistency with other setter functions).
Returns
EC_Normal if successful, an error code otherwise

◆ setPixelAspectRatio()

template<OFVARIADIC_DECLARE_TEMPLATE_PARAMETER_PACK_WITH_DEFAULTS(T) >
OFCondition IODImagePixelVariant<>::setPixelAspectRatio ( const OFString verticalPixelSize,
const OFString horizontalPixelSize,
const OFBool  checkValue = OFTrue 
)
inline

Set Pixel Aspect Ratio.

Parameters
verticalPixelSizeThe vertical pixel size (no unit)
horizontalPixelSizeThe horizontal pixel size (no unit)
checkValueCheck 'value' for conformance with VR (IS)
Returns
EC_Normal if successful, an error code otherwise

◆ setRows()

template<OFVARIADIC_DECLARE_TEMPLATE_PARAMETER_PACK_WITH_DEFAULTS(T) >
OFCondition IODImagePixelVariant<>::setRows ( const Uint16  value,
const OFBool  checkValue = OFTrue 
)
inline

Set Rows.

Parameters
valueReference to variable in which the value should be stored
checkValueCheck 'value'. Not evaluated (here for consistency with other setter functions).
Returns
EC_Normal if successful, an error code otherwise

◆ setValueCheckOnWrite()

template<OFVARIADIC_DECLARE_TEMPLATE_PARAMETER_PACK_WITH_DEFAULTS(T) >
void IODImagePixelVariant<>::setValueCheckOnWrite ( const OFBool  doCheck)
inline

Set whether attribute values should be checked on writing, i.e.

if writing should fail if attribute values violate their VR, VM, character set or value length. A missing but required value is always considered an error, independent of this setting. If set to OFFalse, writing will always succeed, even if attribute value constraints are violated. A warning instead of an error will be printed to the logger.

Parameters
doCheckIf OFTrue, attribute value errors are handled as errors on writing, if OFFalse any errors are ignored.

Referenced by DcmIODImage<>::setValueCheckOnWrite().

◆ write()

template<OFVARIADIC_DECLARE_TEMPLATE_PARAMETER_PACK_WITH_DEFAULTS(T) >
OFCondition IODImagePixelVariant<>::write ( DcmItem dataset)
inline

Write pixel module base class data to given item.

Parameters
datasetThe item to write to (usually dataset level)
Returns
EC_Normal if successful, error otherwise

Referenced by DcmIODImage<>::write().


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


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