56#ifndef vtkVolumeTexture_h
57#define vtkVolumeTexture_h
64#include "vtkRenderingVolumeOpenGL2Module.h"
69VTK_ABI_NAMESPACE_BEGIN
175 static void GetScaleAndBias(
int scalarType,
float* scalarRange,
float& scale,
float& bias);
211 bool LoadTexture(
int interpolation,
VolumeBlock* volBlock);
216 void SplitVolume(
vtkImageData* imageData, Size3
const& part);
218 void CreateBlocks(
unsigned int format,
unsigned int internalFormat,
int type);
220 void AdjustExtentForCell(Size6& extent);
221 Size3 ComputeBlockSize(VTK_FUTURE_CONST
int extent[6]);
227 void SelectTextureFormat(
unsigned int& format,
unsigned int& internalFormat,
int& type,
228 int scalarType,
int noOfComponents);
240 void UpdateTextureToDataMatrix(
VolumeBlock* block);
260 void ComputeCellToPointMatrix(
int extents[6]);
271 bool AreDimensionsValid(
vtkTextureObject* texture,
int width,
int height,
int depth);
273 bool SafeLoadTexture(
vtkTextureObject* texture,
int width,
int height,
int depth,
int numComps,
274 int dataType,
void* dataPtr);
277 void UpdateInterpolationType(
int interpolation);
278 void SetInterpolation(
int interpolation);
284 std::vector<vtkDataSet*> ImageDataBlocks;
285 std::map<vtkDataSet*, VolumeBlock*> ImageDataBlockMap;
286 std::vector<VolumeBlock*> SortedVolumeBlocks;
287 size_t CurrentBlockIdx;
290 std::vector<Size3> TextureSizes;
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
Allocate and hold a VTK object.
abstract specification for renderers
Hold a reference to a vtkObjectBase instance.
abstracts an OpenGL texture object.
record modification and/or execution time
templated base type for containers of constant size.
represents the common properties for rendering a volume.
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.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void UpdateVolume(vtkVolumeProperty *property)
It currently only calls SetInterpolation internally.
void ReleaseGraphicsResources(vtkWindow *win)
Clean-up acquired graphics resources.
VolumeBlock * GetNextBlock()
Return the next volume block to be rendered and load its data.
static vtkVolumeTexture * New()
vtkDataArray * GetLoadedScalars()
vtkSmartPointer< vtkTextureObject > CoordsTex
VolumeBlock * GetCurrentBlock()
Return the currently loaded block.
~vtkVolumeTexture() override
const Size3 & GetPartitions()
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.
bool HandleLargeDataTypes
window superclass for vtkRenderWindow
VolumeBlock(vtkDataSet *dataset, vtkTextureObject *tex, Size3 const &texSize)
double VolumeGeometry[24]
vtkNew< vtkMatrix4x4 > TextureToDataset
vtkNew< vtkMatrix4x4 > TextureToDatasetInv
double DatasetStepSize[3]
vtkTextureObject * TextureObject
double LoadedBounds[6]
LoadedBounds are corrected for cell-data (if that is the case).