53 #ifndef vtkVolumeTexture_h
54 #define vtkVolumeTexture_h
61 #include "vtkRenderingVolumeOpenGL2Module.h"
66 VTK_ABI_NAMESPACE_BEGIN
90 TextureSize = texSize;
109 double DatasetStepSize[3];
115 double LoadedBounds[6];
116 double LoadedBoundsAA[6];
117 double VolumeGeometry[24];
178 float ScalarRange[4][2];
179 float CellSpacing[3];
185 float AdjustedTexMin[4];
186 float AdjustedTexMax[4];
190 int CoordsTexSizes[3];
191 float CoordsScale[3];
208 bool LoadTexture(
int interpolation,
VolumeBlock* volBlock);
215 void CreateBlocks(
unsigned int format,
unsigned int internalFormat,
int type);
224 void SelectTextureFormat(
unsigned int& format,
unsigned int& internalFormat,
int&
type,
225 int scalarType,
int noOfComponents);
237 void UpdateTextureToDataMatrix(
VolumeBlock* block);
257 void ComputeCellToPointMatrix(
int extents[6]);
271 int dataType,
void* dataPtr);
274 void UpdateInterpolationType(
int interpolation);
275 void SetInterpolation(
int interpolation);
281 std::vector<vtkDataSet*> ImageDataBlocks;
282 std::map<vtkDataSet*, VolumeBlock*> ImageDataBlockMap;
283 std::vector<VolumeBlock*> SortedVolumeBlocks;
284 size_t CurrentBlockIdx;
287 std::vector<Size3> TextureSizes;
295 VTK_ABI_NAMESPACE_END
abstract superclass for arrays of numeric data
abstract class to specify dataset behavior
topologically and geometrically regular array of data
a simple class to control print indentation
represent and manipulate 4x4 transformation matrices
abstract base class for most VTK objects
abstract specification for renderers
abstracts an OpenGL texture object.
record modification and/or execution time
represents the common properties for rendering a volume.
Creates and manages the volume texture rendered by vtkOpenGLGPUVolumeRayCastMapper.
static vtkVolumeTexture * New()
VolumeBlock * GetNextBlock()
Return the next volume block to be rendered and load its data.
bool LoadVolume(vtkRenderer *ren, vtkDataSet *data, vtkDataArray *scalars, int isCell, int interpolation)
Loads the data array into the texture in the case only a single block is is defined.
vtkSmartPointer< vtkTextureObject > BlankingTex
vtkNew< vtkMatrix4x4 > CellToPointMatrix
void SetPartitions(int x, int y, int z)
Set a number of blocks per axis.
vtkDataArray * GetLoadedScalars()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
const Size3 & GetPartitions()
void UpdateVolume(vtkVolumeProperty *property)
It currently only calls SetInterpolation internally.
void ReleaseGraphicsResources(vtkWindow *win)
Clean-up acquired graphics resources.
vtkSmartPointer< vtkTextureObject > CoordsTex
~vtkVolumeTexture() override
static void GetScaleAndBias(int scalarType, float *scalarRange, float &scale, float &bias)
Get the scale and bias values given a VTK scalar type and a finite range.
void SortBlocksBackToFront(vtkRenderer *ren, vtkMatrix4x4 *volumeMat)
If streaming the data array as separate blocks, sort them back to front.
VolumeBlock * GetCurrentBlock()
Return the currently loaded block.
bool HandleLargeDataTypes
window superclass for vtkRenderWindow
std::map< std::string, DataArray > DataSet
key: variable name, value: DataArray
VolumeBlock(vtkDataSet *dataset, vtkTextureObject *tex, Size3 const &texSize)
vtkNew< vtkMatrix4x4 > TextureToDataset
vtkNew< vtkMatrix4x4 > TextureToDatasetInv
vtkTextureObject * TextureObject