24#ifndef _SB_IMAGEDATAVOXEL_H_
25#define _SB_IMAGEDATAVOXEL_H_
72 template <
typename TypeOut> TypeOut castValue(
size_t channelIndex)
const;
79 template <
typename TypeOut> TypeOut&
getValue(
size_t channelIndex);
81 template <
typename TypeOut>
const TypeOut&
getValue(
size_t channelIndex)
const;
86 void* getDataPtr()
const;
105template <
typename TypeOut>
110 throw SbException(
"out of range");
130template <
typename TypeOut>
135 throw SbException(
"out of range");
138 const SbDataType dataTypeOut = SbDataType::getTemplateType(returnValue);
141 throw SbException(
"inconsistent dataType");
143 return ((TypeOut*) m_ptr)[i];
147template <
typename TypeOut>
152 throw SbException(
"out of range");
155 const SbDataType dataTypeOut = SbDataType::getTemplateType(returnValue);
158 throw SbException(
"inconsistent dataType");
160 return ((TypeOut*) m_ptr)[i];
valueRef getValue() const
Class encoding a data type.
@ UNSIGNED_INT32
unsigned int (32bits)
@ UNSIGNED_BYTE
unsigned byte
@ SIGNED_SHORT
signed short
@ UNSIGNED_SHORT
unsigned short
@ SIGNED_INT32
signed int (32bits)
SbString getString() const
Returns the type as a string, e.g.
<a href="IconLegend.html"><img src="extIP.gif" alt="ImageViz" border="0"></a> Basic class representi...
const SbDataType & getDataType() const
Return type of channels.
<a href="IconLegend.html"><img src="extIP.gif" alt="ImageViz" border="0"></a> Utility class used to ...
TypeOut castValue(size_t channelIndex) const
Return value casted to the proper type.
SbImageDataVoxel(const SbImageDataVoxel &)
Copy constructor.
TypeOut & getValue(size_t channelIndex)
Return reference to values.
const SbImageDataVoxel & operator=(const SbImageDataVoxel &right)
Copy operator.
SbImageDataVoxel(const SbImageDataType &channelType, SoBufferObject *buffer, size_t offset)
const SbImageDataType & getImageDataType() const
Return channel type.
~SbImageDataVoxel()
Unmap buffer.
const char * toLatin1() const
Returns the string as a Latin-1/ASCII C string.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
static void postWarning(const char *methodName, const char *formatString ...)
Posts a warning.
Smart pointer for any class inheriting SoRefCounter.