DCMTK  Version 3.7.0
OFFIS DICOM Toolkit
Public Member Functions | Protected Member Functions | Static Private Attributes | List of all members
IODPaletteColorLUTModule Class Reference

Class representing the Palette Color Lookup Table Module: More...

+ Inheritance diagram for IODPaletteColorLUTModule:

Public Member Functions

 IODPaletteColorLUTModule (OFshared_ptr< DcmItem > item, OFshared_ptr< IODRules > rules)
 Constructor. More...
 
 IODPaletteColorLUTModule ()
 Constructor.
 
virtual ~IODPaletteColorLUTModule ()
 Destructor.
 
virtual void clearData ()
 Clear all attributes from the data that are handled by this module. More...
 
virtual void resetRules ()
 Resets rules to their original values.
 
virtual OFString getName () const
 Get name of module. 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 Uint8 numBits ()
 Returns the number of bits used per LUT data entry. More...
 
virtual OFCondition getRedPaletteColorLookupTableDescriptor (Uint16 &value, const unsigned long pos=0) const
 Get the Red Palette Color Lookup Table​ Descriptor. More...
 
virtual OFCondition getGreenPaletteColorLookupTableDescriptor (Uint16 &value, const unsigned long pos=0) const
 Get the Green Palette Color Lookup Table​ Descriptor. More...
 
virtual OFCondition getBluePaletteColorLookupTableDescriptor (Uint16 &value, const unsigned long pos=0) const
 Get the Blue Palette Color Lookup Table​ Descriptor. More...
 
virtual OFCondition getPaletteColorLookupTableUID (OFString &value, const signed long pos=0) const
 Get the Palette Color Lookup Table UID. More...
 
virtual OFCondition getRedPaletteColorLookupTableData (const Uint16 *&dataCopy, unsigned long &numEntries)
 Get the Red Palette Color Lookup Table​ Data​ (16 bit version) More...
 
virtual OFCondition getRedPaletteColorLookupTableData (const Uint8 *&dataCopy, unsigned long &numEntries)
 Get the Red Palette Color Lookup Table​ Data​ (8 bit version) More...
 
virtual OFCondition getGreenPaletteColorLookupTableData (const Uint16 *&dataCopy, unsigned long &numEntries)
 Get the Green Palette Color Lookup Table​ Data​ (16 bit version) More...
 
virtual OFCondition getGreenPaletteColorLookupTableData (const Uint8 *&dataCopy, unsigned long &numEntries)
 Get the Green Palette Color Lookup Table​ Data​ (8 bit version) More...
 
virtual OFCondition getBluePaletteColorLookupTableData (const Uint16 *&dataCopy, unsigned long &numEntries)
 Get the Blue Palette Color Lookup Table​ Data​ (16 bit version) More...
 
virtual OFCondition getBluePaletteColorLookupTableData (const Uint8 *&dataCopy, unsigned long &numEntries)
 Get the Blue Palette Color Lookup Table​ Data​ (8 bit version) More...
 
virtual OFCondition getSegmentedRedPaletteColorLookupTableData (const Uint16 *&dataCopy, unsigned long &numEntries)
 Get the Segmented Red Palette Color Lookup Table​ Data​ More...
 
virtual OFCondition getSegmentedRedPaletteColorLookupTableData (const Uint8 *&dataCopy, unsigned long &numEntries)
 Get the Segmented Red Palette Color Lookup Table​ Data​ (8 bit version) More...
 
virtual OFCondition getSegmentedGreenPaletteColorLookupTableData (const Uint16 *&dataCopy, unsigned long &numEntries)
 Get the Segmented Green Palette Color Lookup Table​ Data​ (16 bit version) More...
 
virtual OFCondition getSegmentedGreenPaletteColorLookupTableData (const Uint8 *&dataCopy, unsigned long &numEntries)
 Get the Segmented Green Palette Color Lookup Table​ Data​ (8 bit version) More...
 
virtual OFCondition getSegmentedBluePaletteColorLookupTableData (const Uint16 *&dataCopy, unsigned long &numEntries)
 Get the Segmented Blue Palette Color Lookup Table​ Data​ (16 bit version) More...
 
virtual OFCondition getSegmentedBluePaletteColorLookupTableData (const Uint8 *&dataCopy, unsigned long &numEntries)
 Get the Segmented Blue Palette Color Lookup Table​ Data​ (8 bit version) More...
 
virtual OFCondition setRedPaletteColorLookupTableDescriptor (const Uint16 &value, const unsigned long pos=0)
 Set the Red Palette Color Lookup Table​ Descriptor. More...
 
virtual OFCondition setGreenPaletteColorLookupTableDescriptor (const Uint16 &value, const unsigned long pos=0)
 Set the Green Palette Color Lookup Table​ Descriptor. More...
 
virtual OFCondition setBluePaletteColorLookupTableDescriptor (const Uint16 &value, const unsigned long pos=0)
 Set the Blue Palette Color Lookup Table​ Descriptor. More...
 
virtual OFCondition setPaletteColorLookupTableUID (const OFString &value, const OFBool checkValue=OFTrue)
 Set the Palette Color Lookup Table UID. More...
 
virtual OFCondition setRedPaletteColorLookupTableData (const Uint16 *value, const unsigned long numEntries, const OFBool checkValue=OFTrue)
 Set the Red Palette Color Lookup Table​ Data​ (16 bit version) More...
 
virtual OFCondition setRedPaletteColorLookupTableData (const Uint8 *value, const unsigned long numEntries, const OFBool checkValue=OFTrue)
 Set the Red Palette Color Lookup Table​ Data​ (8 bit version) More...
 
virtual OFCondition setGreenPaletteColorLookupTableData (const Uint16 *value, const unsigned long numEntries, const OFBool checkValue=OFTrue)
 Set the Green Palette Color Lookup Table​ Data​ (16 bit version) More...
 
virtual OFCondition setGreenPaletteColorLookupTableData (const Uint8 *value, const unsigned long numEntries, const OFBool checkValue=OFTrue)
 Set the Green Palette Color Lookup Table​ Data​ (8 bit version) More...
 
virtual OFCondition setBluePaletteColorLookupTableData (const Uint16 *value, const unsigned long numEntries, const OFBool checkValue=OFTrue)
 Set the Blue Palette Color Lookup Table​ Data​ (16 bit version) More...
 
virtual OFCondition setBluePaletteColorLookupTableData (const Uint8 *value, const unsigned long numEntries, const OFBool checkValue=OFTrue)
 Set the Blue Palette Color Lookup Table​ Data​ (8 bit version). More...
 
virtual OFCondition setSegmentedRedPaletteColorLookupTableData (const Uint16 *value, const unsigned long numEntries, const OFBool checkValue=OFTrue)
 Set the Segmented Red Palette Color Lookup Table​ Data​ (16 bit version). More...
 
virtual OFCondition setSegmentedRedPaletteColorLookupTableData (const Uint8 *value, const unsigned long numEntries, const OFBool checkValue=OFTrue)
 Set the Segmented Red Palette Color Lookup Table​ Data​ (8 bit version). More...
 
virtual OFCondition setSegmentedGreenPaletteColorLookupTableData (const Uint16 *value, const unsigned long numEntries, const OFBool checkValue=OFTrue)
 Set the Segmented Green Palette Color Lookup Table​ Data​ (16 bit version). More...
 
virtual OFCondition setSegmentedGreenPaletteColorLookupTableData (const Uint8 *value, const unsigned long numEntries, const OFBool checkValue=OFTrue)
 Set the Segmented Green Palette Color Lookup Table​ Data​ (8 bit version) More...
 
virtual OFCondition setSegmentedBluePaletteColorLookupTableData (const Uint16 *value, const unsigned long numEntries, const OFBool checkValue=OFTrue)
 Set the Segmented Blue Palette Color Lookup Table​ Data​ (16 bit version). More...
 
virtual OFCondition setSegmentedBluePaletteColorLookupTableData (const Uint8 *value, const unsigned long numEntries, const OFBool checkValue=OFTrue)
 Set the Segmented Blue Palette Color Lookup Table​ Data​ (8 bit version). More...
 
template<typename T >
OFCondition setPaletteColorLookupTableData (const T *copyRed, const T *copyGreen, const T *copyBlue, const unsigned long numEntries, const OFBool checkValue=OFTrue)
 Set the Palette Color Lookup Table​ Data​ (red, green, blue, 8 or 16 bit). More...
 
template<typename T >
OFCondition setSegmentedPaletteColorLookupTableData (const T *copyRedData, const T *copyGreenData, const T *copyBlueData, const unsigned long numEntries, const OFBool checkValue=OFTrue)
 Sets the red, green, and blue data for a segmented palette color lookup table. More...
 
virtual OFCondition setRedPaletteColorLookupTableDescriptor (const Uint16 numEntries, const Uint16 firstValueMapped, const Uint8 numBitsPerEntry)
 Sets all three values of the Red Palette Color Lookup Table Descriptor. More...
 
virtual OFCondition setGreenPaletteColorLookupTableDescriptor (const Uint16 numEntries, const Uint16 firstValueMapped, const Uint8 numBitsPerEntry)
 Sets all three values of the Green Palette Color Lookup Table Descriptor. More...
 
virtual OFCondition setBluePaletteColorLookupTableDescriptor (const Uint16 numEntries, const Uint16 firstValueMapped, const Uint8 numBitsPerEntry)
 Sets the blue Palette Color Lookup Table Descriptor. More...
 
- Public Member Functions inherited from IODModule
 IODModule (OFshared_ptr< DcmItem > item, OFshared_ptr< IODRules > rules)
 Constructor. More...
 
 IODModule ()
 Constructor. More...
 
 IODModule (const IODModule &rhs)
 Copy constructor, creates shallow copy. More...
 
IODModuleoperator= (const IODModule &rhs)
 Assignment operator, creates shallow copy. More...
 
 ~IODModule ()
 Destructor.
 
- 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.
 
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 OFCondition check (const OFBool quiet=OFFalse)
 Check whether this component's data satisfies the underlying rules. More...
 
virtual int compare (const IODComponent &rhs) const
 Comparison operator for IOD Components. More...
 
virtual bool getValueCheckOnWrite () const
 Get whether attribute value errors will be handled as errors on writing. More...
 
virtual void setValueCheckOnWrite (const OFBool checkValue)
 Set whether attribute values should be checked on writing, i.e. More...
 

Protected Member Functions

virtual OFCondition getUint8DataCopy (const DcmTagKey &dataTag, const Uint8 *&lutData, unsigned long &num8BitEntries)
 Returns a copy of the data for the given tag. More...
 
virtual OFCondition putUint8Data (const DcmTagKey &dataTag, const Uint8 *lutData, const unsigned long num8BitEntries)
 Put the given 8 bit data into the given tag. More...
 
virtual OFCondition getUint16DataCopy (const DcmTagKey &dataTag, const Uint16 *&lutData, unsigned long &numEntries)
 Returns a 16 bit copy of the data for the given tag. More...
 
virtual OFCondition getUint16Data (const DcmTagKey &dataTag, const Uint16 *&lutData, unsigned long &numEntries)
 Returns a reference of the data from the given tag and the number of entries in the data. More...
 
virtual OFBool checkLUT (const DcmTagKey &descriptorTag, const DcmTagKey &dataTag)
 Check given LUT for consistency with descriptor. More...
 
virtual OFBool checkDescriptorConsistency (const OFBool &isError)
 Check basic consistency rules of all palette descriptors (not their data). More...
 
virtual OFBool checkDataConsistency (const OFBool &isError)
 Check basic consistency of all palette data with their descriptors. More...
 
virtual OFBool checkSegmentConsistency (const OFBool &isError, OFBool &isSegmented)
 Check that either segmented or unsegmented LUT data is used, not both. More...
 
virtual void reportLUTError (const DcmTagKey &descriptorTag, const OFString &message, const OFBool &isError)
 Report error/warning for given descriptor tag. More...
 
virtual OFCondition numEntriesForData (const DcmTagKey &dataTag, Uint16 &result)
 Get number of LUT data entries for given descriptor tag. More...
 

Static Private Attributes

static const OFString m_ModuleName
 The module's name ("PaletteColorLookupTableModule")
 

Additional Inherited Members

- 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, const OFBool checkValue)
 Static helper function that writes attributes from given item into destination item, as determined by the provided rules and component name. More...
 
- 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.
 
OFBool m_CheckValueOnWrite
 Denotes whether attribute values should be checked on writing, i.e. More...
 

Detailed Description

Class representing the Palette Color Lookup Table Module:

Red Palette Color Lookup Table​ Descriptor (0028,1101): (US or SS, 3, 1) Green Palette Color Lookup Table​ Descriptor (0028,1102): (US or SS, 3, 1) Blue Palette Color Lookup Table​ Descriptor (0028,1103): (US or SS, 3, 1) Palette Color Lookup Table UID (0028,1199): (UI, 1, 3) Red Palette Color Lookup Table​ Data​ (0028,1201): (OW, 1-n, 1C) Green Palette Color Lookup Table​ Data​ (0028,1202): (OW, 1-n, 1C) Blue Palette Color Lookup Table​ Data​ (0028,1203): (OW, 1-n, 1C) Segmented Red Palette Color Lookup Table​ Data​ (0028,1221): (OW, 1-n, 1C) Segmented Green Palette Color Lookup Table​ Data​ (0028,1222): (OW, 1-n, 1C) Segmented Blue Palette Color Lookup Table​ Data​ (0028,1223): (OW, 1-n, 1C)

Constructor & Destructor Documentation

◆ IODPaletteColorLUTModule()

IODPaletteColorLUTModule::IODPaletteColorLUTModule ( OFshared_ptr< DcmItem item,
OFshared_ptr< IODRules rules 
)

Constructor.

Parameters
itemThe item to be used for data storage. If NULL, the class creates an empty data container.
rulesThe rule set for this class. If NULL, the class creates one from scratch and adds its values.

Member Function Documentation

◆ checkDataConsistency()

virtual OFBool IODPaletteColorLUTModule::checkDataConsistency ( const OFBool &  isError)
protectedvirtual

Check basic consistency of all palette data with their descriptors.

Parameters
isErrorIf OFTrue, errors are reported, otherwise warnings
Returns
OFTrue if all data is consistent, OFFalse otherwise

◆ checkDescriptorConsistency()

virtual OFBool IODPaletteColorLUTModule::checkDescriptorConsistency ( const OFBool &  isError)
protectedvirtual

Check basic consistency rules of all palette descriptors (not their data).

Parameters
isErrorIf OFTrue, errors are reported, otherwise warnings
Returns
OFTrue if all descriptors are consistent, OFFalse otherwise

◆ checkLUT()

virtual OFBool IODPaletteColorLUTModule::checkLUT ( const DcmTagKey descriptorTag,
const DcmTagKey dataTag 
)
protectedvirtual

Check given LUT for consistency with descriptor.

Parameters
descriptorTagThe tag of the descriptor to be checked (i.e. Red/Green/BluePaletteColorLookupTableDescriptor)
dataTagThe tag of the data to be checked (i.e. Red/Green/BluePaletteColorLookupTableData). Should of course match the descriptor "color".
Returns
OFTrue if LUT is consistent, OFFalse otherwise

◆ checkSegmentConsistency()

virtual OFBool IODPaletteColorLUTModule::checkSegmentConsistency ( const OFBool &  isError,
OFBool &  isSegmented 
)
protectedvirtual

Check that either segmented or unsegmented LUT data is used, not both.

Parameters
isErrorIf OFTrue, errors are reported, otherwise warnings
isSegmentedReturns OFTrue if segmented LUT data is used, OFFalse otherwise
Returns
OFTrue if LUT data is consistent, OFFalse otherwise

◆ clearData()

virtual void IODPaletteColorLUTModule::clearData ( )
virtual

Clear all attributes from the data that are handled by this module.

An attribute is considered belonging to the module if there are rules marked as belonging to this module via the rule's module name.

Reimplemented from IODComponent.

◆ getBluePaletteColorLookupTableData() [1/2]

virtual OFCondition IODPaletteColorLUTModule::getBluePaletteColorLookupTableData ( const Uint16 *&  dataCopy,
unsigned long &  numEntries 
)
virtual

Get the Blue Palette Color Lookup Table​ Data​ (16 bit version)

Parameters
dataCopyReference to variable in which a copy of the value should be stored
numEntriesNumber of entries in the lookup table
Returns
EC_Normal if successful, an error code otherwise

◆ getBluePaletteColorLookupTableData() [2/2]

virtual OFCondition IODPaletteColorLUTModule::getBluePaletteColorLookupTableData ( const Uint8 *&  dataCopy,
unsigned long &  numEntries 
)
virtual

Get the Blue Palette Color Lookup Table​ Data​ (8 bit version)

Parameters
dataCopyReference to variable in which a copy of the value should be stored
numEntriesNumber of entries in the lookup table
Returns
EC_Normal if successful, an error code otherwise

◆ getBluePaletteColorLookupTableDescriptor()

virtual OFCondition IODPaletteColorLUTModule::getBluePaletteColorLookupTableDescriptor ( Uint16 &  value,
const unsigned long  pos = 0 
) const
virtual

Get the Blue Palette Color Lookup Table​ Descriptor.

Parameters
valueThe value of Blue Palette Color Lookup Table​ Descriptor
posThe position of the value to be retrieved (0..2)
Returns
EC_Normal if value is found, an error code otherwise

◆ getGreenPaletteColorLookupTableData() [1/2]

virtual OFCondition IODPaletteColorLUTModule::getGreenPaletteColorLookupTableData ( const Uint16 *&  dataCopy,
unsigned long &  numEntries 
)
virtual

Get the Green Palette Color Lookup Table​ Data​ (16 bit version)

Parameters
dataCopyReference to variable in which a copy of the value should be stored
numEntriesNumber of entries in the lookup table
Returns
EC_Normal if successful, an error code otherwise

◆ getGreenPaletteColorLookupTableData() [2/2]

virtual OFCondition IODPaletteColorLUTModule::getGreenPaletteColorLookupTableData ( const Uint8 *&  dataCopy,
unsigned long &  numEntries 
)
virtual

Get the Green Palette Color Lookup Table​ Data​ (8 bit version)

Parameters
dataCopyReference to variable in which a copy of the value should be stored
numEntriesNumber of entries in the lookup table
Returns
EC_Normal if successful, an error code otherwise

◆ getGreenPaletteColorLookupTableDescriptor()

virtual OFCondition IODPaletteColorLUTModule::getGreenPaletteColorLookupTableDescriptor ( Uint16 &  value,
const unsigned long  pos = 0 
) const
virtual

Get the Green Palette Color Lookup Table​ Descriptor.

Parameters
valueThe value of Green Palette Color Lookup Table​ Descriptor
posThe position of the value to be retrieved (0..2)
Returns
EC_Normal if value is found, an error code otherwise

◆ getName()

virtual OFString IODPaletteColorLUTModule::getName ( ) const
virtual

Get name of module.

Returns
Name of the module ("PaletteColorLookupTableModule")

Implements IODComponent.

◆ getPaletteColorLookupTableUID()

virtual OFCondition IODPaletteColorLUTModule::getPaletteColorLookupTableUID ( OFString value,
const signed long  pos = 0 
) const
virtual

Get the Palette Color Lookup Table UID.

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

◆ getRedPaletteColorLookupTableData() [1/2]

virtual OFCondition IODPaletteColorLUTModule::getRedPaletteColorLookupTableData ( const Uint16 *&  dataCopy,
unsigned long &  numEntries 
)
virtual

Get the Red Palette Color Lookup Table​ Data​ (16 bit version)

Parameters
dataCopyReference to variable in which a copy of the value should be stored
numEntriesNumber of entries in the lookup table
Returns
EC_Normal if successful, an error code otherwise

◆ getRedPaletteColorLookupTableData() [2/2]

virtual OFCondition IODPaletteColorLUTModule::getRedPaletteColorLookupTableData ( const Uint8 *&  dataCopy,
unsigned long &  numEntries 
)
virtual

Get the Red Palette Color Lookup Table​ Data​ (8 bit version)

Parameters
dataCopyReference to variable in which a copy of the value should be stored
numEntriesNumber of entries in the lookup table
Returns
EC_Normal if successful, an error code otherwise

◆ getRedPaletteColorLookupTableDescriptor()

virtual OFCondition IODPaletteColorLUTModule::getRedPaletteColorLookupTableDescriptor ( Uint16 &  value,
const unsigned long  pos = 0 
) const
virtual

Get the Red Palette Color Lookup Table​ Descriptor.

Parameters
valueThe value of Red Palette Color Lookup Table​ Descriptor
posThe position of the value to be retrieved (0..2)
Returns
EC_Normal if value is found, an error code otherwise

◆ getSegmentedBluePaletteColorLookupTableData() [1/2]

virtual OFCondition IODPaletteColorLUTModule::getSegmentedBluePaletteColorLookupTableData ( const Uint16 *&  dataCopy,
unsigned long &  numEntries 
)
virtual

Get the Segmented Blue Palette Color Lookup Table​ Data​ (16 bit version)

Parameters
dataCopyReference to variable in which a copy of the value should be stored
numEntriesNumber of entries in the lookup table
Returns
EC_Normal if successful, an error code otherwise

◆ getSegmentedBluePaletteColorLookupTableData() [2/2]

virtual OFCondition IODPaletteColorLUTModule::getSegmentedBluePaletteColorLookupTableData ( const Uint8 *&  dataCopy,
unsigned long &  numEntries 
)
virtual

Get the Segmented Blue Palette Color Lookup Table​ Data​ (8 bit version)

Parameters
dataCopyReference to variable in which a copy of the value should be stored
numEntriesNumber of entries in the lookup table
Returns
EC_Normal if successful, an error code otherwise

◆ getSegmentedGreenPaletteColorLookupTableData() [1/2]

virtual OFCondition IODPaletteColorLUTModule::getSegmentedGreenPaletteColorLookupTableData ( const Uint16 *&  dataCopy,
unsigned long &  numEntries 
)
virtual

Get the Segmented Green Palette Color Lookup Table​ Data​ (16 bit version)

Parameters
dataCopyReference to variable in which a copy of the value should be stored
numEntriesNumber of entries in the lookup table
Returns
EC_Normal if successful, an error code otherwise

◆ getSegmentedGreenPaletteColorLookupTableData() [2/2]

virtual OFCondition IODPaletteColorLUTModule::getSegmentedGreenPaletteColorLookupTableData ( const Uint8 *&  dataCopy,
unsigned long &  numEntries 
)
virtual

Get the Segmented Green Palette Color Lookup Table​ Data​ (8 bit version)

Parameters
dataCopyReference to variable in which a copy of the value should be stored
numEntriesNumber of entries in the lookup table
Returns
EC_Normal if successful, an error code otherwise

◆ getSegmentedRedPaletteColorLookupTableData() [1/2]

virtual OFCondition IODPaletteColorLUTModule::getSegmentedRedPaletteColorLookupTableData ( const Uint16 *&  dataCopy,
unsigned long &  numEntries 
)
virtual

Get the Segmented Red Palette Color Lookup Table​ Data​

Parameters
dataCopyReference to variable in which a copy of the value should be stored
numEntriesNumber of entries in the lookup table
Returns
EC_Normal if successful, an error code otherwise

◆ getSegmentedRedPaletteColorLookupTableData() [2/2]

virtual OFCondition IODPaletteColorLUTModule::getSegmentedRedPaletteColorLookupTableData ( const Uint8 *&  dataCopy,
unsigned long &  numEntries 
)
virtual

Get the Segmented Red Palette Color Lookup Table​ Data​ (8 bit version)

Parameters
dataCopyReference to variable in which a copy of the value should be stored
numEntriesNumber of entries in the lookup table
Returns
EC_Normal if successful, an error code otherwise

◆ getUint16Data()

virtual OFCondition IODPaletteColorLUTModule::getUint16Data ( const DcmTagKey dataTag,
const Uint16 *&  lutData,
unsigned long &  numEntries 
)
protectedvirtual

Returns a reference of the data from the given tag and the number of entries in the data.

Parameters
dataTagThe tag of the data to be copied to (i.e. Red/Green/Blue/PaletteColorLookupTableData)
lutDataThe pointer that will be set to the data
numEntriesThe number of entries in the data
Returns
EC_Normal if successful, an error code otherwise

◆ getUint16DataCopy()

virtual OFCondition IODPaletteColorLUTModule::getUint16DataCopy ( const DcmTagKey dataTag,
const Uint16 *&  lutData,
unsigned long &  numEntries 
)
protectedvirtual

Returns a 16 bit copy of the data for the given tag.

The data is returned into the given pointer and the number of entries is returned.

Parameters
dataTagThe tag of the data to be copied to (i.e. Red/Green/Blue/PaletteColorLookupTableData)
lutDataThe pointer that will be set to the copied data
numEntriesThe number of entries in the data
Returns
EC_Normal if successful, an error code otherwise

◆ getUint8DataCopy()

virtual OFCondition IODPaletteColorLUTModule::getUint8DataCopy ( const DcmTagKey dataTag,
const Uint8 *&  lutData,
unsigned long &  num8BitEntries 
)
protectedvirtual

Returns a copy of the data for the given tag.

A copy of the data is returned into the given pointer and the number of entries is returned.

Parameters
dataTagThe tag of the data to be copied (i.e. Red/Green/Blue/PaletteColorLookupTableData)
lutDataThe pointer that will be set to the copied data
num8BitEntriesThe number of entries in the lookup table
Returns
EC_Normal if successful, an error code otherwise

◆ numBits()

virtual Uint8 IODPaletteColorLUTModule::numBits ( )
virtual

Returns the number of bits used per LUT data entry.

If the number of bits is not the same for all LUTs, 0 is returned, indicating an error.

Returns
The number of bits used per LUT data entry (8 or 16)

◆ numEntriesForData()

virtual OFCondition IODPaletteColorLUTModule::numEntriesForData ( const DcmTagKey dataTag,
Uint16 &  result 
)
protectedvirtual

Get number of LUT data entries for given descriptor tag.

Parameters
dataTagThe tag of the data to be checked (i.e. Red/Green/BluePaletteColorLookupTableDescriptor)
resultThe number of entries in the data
Returns
EC_Normal if successful, an error code otherwise

◆ putUint8Data()

virtual OFCondition IODPaletteColorLUTModule::putUint8Data ( const DcmTagKey dataTag,
const Uint8 *  lutData,
const unsigned long  num8BitEntries 
)
protectedvirtual

Put the given 8 bit data into the given tag.

Parameters
dataTagThe tag of the data to be copied into (i.e. Red/Green/Blue/PaletteColorLookupTableData)
lutDataThe data to be copied
num8BitEntriesThe number of entries in the lookup table
Returns
EC_Normal if successful, an error code otherwise

◆ read()

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

◆ reportLUTError()

virtual void IODPaletteColorLUTModule::reportLUTError ( const DcmTagKey descriptorTag,
const OFString message,
const OFBool &  isError 
)
protectedvirtual

Report error/warning for given descriptor tag.

Parameters
descriptorTagThe tag of the descriptor to be reported (i.e. Red/Green/BluePaletteColorLookupTableDescriptor)
messageThe message to be reported
isErrorIf OFTrue, an error is reported, otherwise a warning

◆ setBluePaletteColorLookupTableData() [1/2]

virtual OFCondition IODPaletteColorLUTModule::setBluePaletteColorLookupTableData ( const Uint16 *  value,
const unsigned long  numEntries,
const OFBool  checkValue = OFTrue 
)
virtual

Set the Blue Palette Color Lookup Table​ Data​ (16 bit version)

Parameters
valueThe value of Red Palette Color Lookup Table​ Data​
numEntriesNumber of entries in the lookup table
checkValueCheck value for conformance with VR (OW) and VM (1-n) if OFTrue
Returns
EC_Normal if value is set, an error code otherwise

◆ setBluePaletteColorLookupTableData() [2/2]

virtual OFCondition IODPaletteColorLUTModule::setBluePaletteColorLookupTableData ( const Uint8 *  value,
const unsigned long  numEntries,
const OFBool  checkValue = OFTrue 
)
virtual

Set the Blue Palette Color Lookup Table​ Data​ (8 bit version).

Parameters
valueThe value of Red Palette Color Lookup Table​ Data​
numEntriesNumber of entries in the lookup table
checkValueCheck value for conformance with VR (OW) and VM (1-n) if OFTrue
Returns
EC_Normal if value is set, an error code otherwise

◆ setBluePaletteColorLookupTableDescriptor() [1/2]

virtual OFCondition IODPaletteColorLUTModule::setBluePaletteColorLookupTableDescriptor ( const Uint16 &  value,
const unsigned long  pos = 0 
)
virtual

Set the Blue Palette Color Lookup Table​ Descriptor.

Parameters
valueThe value of Blue Palette Color Lookup Table​ Descriptor
posThe position of the value to be set (0..2)
Returns
EC_Normal if value is set, an error code otherwise

◆ setBluePaletteColorLookupTableDescriptor() [2/2]

virtual OFCondition IODPaletteColorLUTModule::setBluePaletteColorLookupTableDescriptor ( const Uint16  numEntries,
const Uint16  firstValueMapped,
const Uint8  numBitsPerEntry 
)
virtual

Sets the blue Palette Color Lookup Table Descriptor.

Parameters
numEntriesThe number of entries in the lookup table.
firstValueMappedThe first value mapped in the lookup table.
numBitsPerEntryThe number of bits per entry in the lookup table.
Returns
EC_Normal if value is set, an error code otherwise

◆ setGreenPaletteColorLookupTableData() [1/2]

virtual OFCondition IODPaletteColorLUTModule::setGreenPaletteColorLookupTableData ( const Uint16 *  value,
const unsigned long  numEntries,
const OFBool  checkValue = OFTrue 
)
virtual

Set the Green Palette Color Lookup Table​ Data​ (16 bit version)

Parameters
valueThe value of Red Palette Color Lookup Table​ Data​
numEntriesNumber of entries in the lookup table
checkValueCheck value for conformance with VR (OW) and VM (1-n) if OFTrue
Returns
EC_Normal if value is set, an error code otherwise

◆ setGreenPaletteColorLookupTableData() [2/2]

virtual OFCondition IODPaletteColorLUTModule::setGreenPaletteColorLookupTableData ( const Uint8 *  value,
const unsigned long  numEntries,
const OFBool  checkValue = OFTrue 
)
virtual

Set the Green Palette Color Lookup Table​ Data​ (8 bit version)

Parameters
valueThe value of Red Palette Color Lookup Table​ Data​
numEntriesNumber of entries in the lookup table
checkValueCheck value for conformance with VR (OW) and VM (1-n) if OFTrue
Returns
EC_Normal if value is set, an error code otherwise

◆ setGreenPaletteColorLookupTableDescriptor() [1/2]

virtual OFCondition IODPaletteColorLUTModule::setGreenPaletteColorLookupTableDescriptor ( const Uint16 &  value,
const unsigned long  pos = 0 
)
virtual

Set the Green Palette Color Lookup Table​ Descriptor.

Parameters
valueThe value of Green Palette Color Lookup Table​ Descriptor
posThe position of the value to be set (0..2)
Returns
EC_Normal if value is set, an error code otherwise

◆ setGreenPaletteColorLookupTableDescriptor() [2/2]

virtual OFCondition IODPaletteColorLUTModule::setGreenPaletteColorLookupTableDescriptor ( const Uint16  numEntries,
const Uint16  firstValueMapped,
const Uint8  numBitsPerEntry 
)
virtual

Sets all three values of the Green Palette Color Lookup Table Descriptor.

Parameters
numEntriesThe number of entries in the lookup table.
firstValueMappedThe first value mapped in the lookup table.
numBitsPerEntryThe number of bits per entry in the lookup table.
Returns
EC_Normal if value is set, an error code otherwise

◆ setPaletteColorLookupTableData()

template<typename T >
OFCondition IODPaletteColorLUTModule::setPaletteColorLookupTableData ( const T *  copyRed,
const T *  copyGreen,
const T *  copyBlue,
const unsigned long  numEntries,
const OFBool  checkValue = OFTrue 
)

Set the Palette Color Lookup Table​ Data​ (red, green, blue, 8 or 16 bit).

Template Parameters
TThe data type of the color lookup table data. (Uint16 or Uint8)
Parameters
copyRedThe value of Red Palette Color Lookup Table​ Data​
copyGreenThe value of Green Palette Color Lookup Table​ Data​
copyBlueThe value of Blue Palette Color Lookup Table​ Data​
numEntriesNumber of entries in each of the lookup tables
checkValueCheck value for conformance with VR (OW) and VM (1-n) if OFTrue
Returns
EC_Normal if value is set, an error code otherwise

◆ setPaletteColorLookupTableUID()

virtual OFCondition IODPaletteColorLUTModule::setPaletteColorLookupTableUID ( const OFString value,
const OFBool  checkValue = OFTrue 
)
virtual

Set the Palette Color Lookup Table UID.

Parameters
valueThe value of Palette Color Lookup Table UID
checkValueCheck value for conformance with VR (UI) and VM (1) if OFTrue
Returns
EC_Normal if value is set, an error code otherwise

◆ setRedPaletteColorLookupTableData() [1/2]

virtual OFCondition IODPaletteColorLUTModule::setRedPaletteColorLookupTableData ( const Uint16 *  value,
const unsigned long  numEntries,
const OFBool  checkValue = OFTrue 
)
virtual

Set the Red Palette Color Lookup Table​ Data​ (16 bit version)

Parameters
valueThe value of Red Palette Color Lookup Table​ Data​
numEntriesNumber of entries in the lookup table
checkValueCheck value for conformance with VR (OW) and VM (1-n) if OFTrue
Returns
EC_Normal if value is set, an error code otherwise

◆ setRedPaletteColorLookupTableData() [2/2]

virtual OFCondition IODPaletteColorLUTModule::setRedPaletteColorLookupTableData ( const Uint8 *  value,
const unsigned long  numEntries,
const OFBool  checkValue = OFTrue 
)
virtual

Set the Red Palette Color Lookup Table​ Data​ (8 bit version)

Parameters
valueThe value of Red Palette Color Lookup Table​ Data​
numEntriesNumber of entries in the lookup table
checkValueCheck value for conformance with VR (OW) and VM (1-n) if OFTrue
Returns
EC_Normal if value is set, an error code otherwise

◆ setRedPaletteColorLookupTableDescriptor() [1/2]

virtual OFCondition IODPaletteColorLUTModule::setRedPaletteColorLookupTableDescriptor ( const Uint16 &  value,
const unsigned long  pos = 0 
)
virtual

Set the Red Palette Color Lookup Table​ Descriptor.

Parameters
valueThe value of Red Palette Color Lookup Table​ Descriptor
posThe position of the value to be set (0..2)
Returns
EC_Normal if value is set, an error code otherwise

◆ setRedPaletteColorLookupTableDescriptor() [2/2]

virtual OFCondition IODPaletteColorLUTModule::setRedPaletteColorLookupTableDescriptor ( const Uint16  numEntries,
const Uint16  firstValueMapped,
const Uint8  numBitsPerEntry 
)
virtual

Sets all three values of the Red Palette Color Lookup Table Descriptor.

Parameters
numEntriesThe number of entries in the lookup table.
firstValueMappedThe first value mapped in the lookup table.
numBitsPerEntryThe number of bits per entry in the lookup table.
Returns
EC_Normal if value is set, an error code otherwise

◆ setSegmentedBluePaletteColorLookupTableData() [1/2]

virtual OFCondition IODPaletteColorLUTModule::setSegmentedBluePaletteColorLookupTableData ( const Uint16 *  value,
const unsigned long  numEntries,
const OFBool  checkValue = OFTrue 
)
virtual

Set the Segmented Blue Palette Color Lookup Table​ Data​ (16 bit version).

Parameters
valueThe value of Red Palette Color Lookup Table​ Data​
numEntriesNumber of entries in the lookup table
checkValueCheck value for conformance with VR (OW) and VM (1-n) if OFTrue
Returns
EC_Normal if value is set, an error code otherwise

◆ setSegmentedBluePaletteColorLookupTableData() [2/2]

virtual OFCondition IODPaletteColorLUTModule::setSegmentedBluePaletteColorLookupTableData ( const Uint8 *  value,
const unsigned long  numEntries,
const OFBool  checkValue = OFTrue 
)
virtual

Set the Segmented Blue Palette Color Lookup Table​ Data​ (8 bit version).

Parameters
valueThe value of Red Palette Color Lookup Table​ Data​
numEntriesNumber of entries in the lookup table
checkValueCheck value for conformance with VR (OW) and VM (1-n) if OFTrue
Returns
EC_Normal if value is set, an error code otherwise

◆ setSegmentedGreenPaletteColorLookupTableData() [1/2]

virtual OFCondition IODPaletteColorLUTModule::setSegmentedGreenPaletteColorLookupTableData ( const Uint16 *  value,
const unsigned long  numEntries,
const OFBool  checkValue = OFTrue 
)
virtual

Set the Segmented Green Palette Color Lookup Table​ Data​ (16 bit version).

Parameters
valueThe value of Red Palette Color Lookup Table​ Data​
numEntriesNumber of entries in the lookup table
checkValueCheck value for conformance with VR (OW) and VM (1-n) if OFTrue
Returns
EC_Normal if value is set, an error code otherwise

◆ setSegmentedGreenPaletteColorLookupTableData() [2/2]

virtual OFCondition IODPaletteColorLUTModule::setSegmentedGreenPaletteColorLookupTableData ( const Uint8 *  value,
const unsigned long  numEntries,
const OFBool  checkValue = OFTrue 
)
virtual

Set the Segmented Green Palette Color Lookup Table​ Data​ (8 bit version)

Parameters
valueThe value of Red Palette Color Lookup Table​ Data​
numEntriesNumber of entries in the lookup table
checkValueCheck value for conformance with VR (OW) and VM (1-n) if OFTrue
Returns
EC_Normal if value is set, an error code otherwise

◆ setSegmentedPaletteColorLookupTableData()

template<typename T >
OFCondition IODPaletteColorLUTModule::setSegmentedPaletteColorLookupTableData ( const T *  copyRedData,
const T *  copyGreenData,
const T *  copyBlueData,
const unsigned long  numEntries,
const OFBool  checkValue = OFTrue 
)

Sets the red, green, and blue data for a segmented palette color lookup table.

The data arrays for red, green, and blue should be of type T and have a length of numEntries.

Template Parameters
TThe data type of the color lookup table data. (Uint16 or Uint8)
Parameters
copyRedDataPointer to the array containing the red data.
copyGreenDataPointer to the array containing the green data.
copyBlueDataPointer to the array containing the blue data.
numEntriesThe number of entries in the lookup table.
checkValueFlag indicating whether to check the input values for validity. Default is true.
Returns
EC_Normal if successful, error otherwise.

◆ setSegmentedRedPaletteColorLookupTableData() [1/2]

virtual OFCondition IODPaletteColorLUTModule::setSegmentedRedPaletteColorLookupTableData ( const Uint16 *  value,
const unsigned long  numEntries,
const OFBool  checkValue = OFTrue 
)
virtual

Set the Segmented Red Palette Color Lookup Table​ Data​ (16 bit version).

Parameters
valueThe value of Red Palette Color Lookup Table​ Data​
numEntriesNumber of entries in the lookup table
checkValueCheck value for conformance with VR (OW) and VM (1-n) if OFTrue
Returns
EC_Normal if value is set, an error code otherwise

◆ setSegmentedRedPaletteColorLookupTableData() [2/2]

virtual OFCondition IODPaletteColorLUTModule::setSegmentedRedPaletteColorLookupTableData ( const Uint8 *  value,
const unsigned long  numEntries,
const OFBool  checkValue = OFTrue 
)
virtual

Set the Segmented Red Palette Color Lookup Table​ Data​ (8 bit version).

Parameters
valueThe value of Red Palette Color Lookup Table​ Data​
numEntriesNumber of entries in the lookup table
checkValueCheck value for conformance with VR (OW) and VM (1-n) if OFTrue
Returns
EC_Normal if value is set, an error code otherwise

◆ write()

virtual OFCondition IODPaletteColorLUTModule::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 Dec 15 2025 for DCMTK Version 3.7.0 by Doxygen 1.9.1