SbImageDataVoxel Class Reference
[Images]

ImageViz Utility class used to safely access channels of a buffer. More...

#include <ImageViz/SbImageDataVoxel.h>

List of all members.

Public Member Functions

 SbImageDataVoxel (const SbImageDataType &channelType, SoBufferObject *buffer, size_t offset)
 ~SbImageDataVoxel ()
 SbImageDataVoxel (const SbImageDataVoxel &)
const SbImageDataVoxeloperator= (const SbImageDataVoxel &right)
const SbImageDataTypegetImageDataType () const
template<typename TypeOut >
TypeOut castValue (size_t channelIndex) const
template<typename TypeOut >
TypeOut & getValue (size_t channelIndex)
template<typename TypeOut >
const TypeOut & getValue (size_t channelIndex) const

Detailed Description

ImageViz Utility class used to safely access channels of a buffer.

Utility class used to safely access channels of a buffer. The bufferObject is mapped in the constructor and unmapped in the destructor.

SEE ALSO

SoImageDataAdapter, SbImageDataAccessor


Constructor & Destructor Documentation

SbImageDataVoxel::SbImageDataVoxel ( const SbImageDataType channelType,
SoBufferObject buffer,
size_t  offset 
)
Parameters:
channelType Type of channel (number of channel + data type)
buffer main buffer containing data. Use to keep data alive and ensure they wont be deleted elsewhere.
offset offset in byte to beginning of channel inside buffer.
SbImageDataVoxel::~SbImageDataVoxel (  ) 

Unmap buffer.

SbImageDataVoxel::SbImageDataVoxel ( const SbImageDataVoxel  ) 

Copy constructor.


Member Function Documentation

template<typename TypeOut >
TypeOut SbImageDataVoxel::castValue ( size_t  channelIndex  )  const [inline]

Return value casted to the proper type.

Return a copy and not a reference because data may be int and you may want to cast to float. Throw exception if channelIndex >= getImageDataType().getNumChannel().

const SbImageDataType& SbImageDataVoxel::getImageDataType (  )  const [inline]

Return channel type.

template<typename TypeOut >
const TypeOut & SbImageDataVoxel::getValue ( size_t  channelIndex  )  const [inline]
template<typename TypeOut >
TypeOut & SbImageDataVoxel::getValue ( size_t  channelIndex  )  [inline]

Return reference to values.

Throw exception if wrong type is specified. Throw exception if channelIndex >= getImageDataType().getNumChannel().

const SbImageDataVoxel& SbImageDataVoxel::operator= ( const SbImageDataVoxel right  ) 

Copy operator.


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

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/