open_iA 2024.9
Loading...
Searching...
No Matches
iAVtkDraw.h File Reference
#include <vtkImageData.h>
#include "iabase_export.h"

Classes

class  iAvtkImageData
 An image which allows the user to specify min/max of scalar range. More...
 

Functions

iAbase_API vtkSmartPointer< iAvtkImageDataallocateiAImage (int vtkType, int const dimensions[3], double const spacing[3], int numComponents)
 allocate an iAvtkImageData image
 
template<typename T >
void clearImage (vtkImageData *img, T c)
 Set all pixels in the given image to the given value See the notes for drawPixel regarding Modified().
 
template<typename T >
void drawLine (vtkImageData *img, int x1, int y1, int x2, int y2, T c)
 Draw a line in the given image.
 
template<typename T >
void drawPixel (vtkImageData *img, int x, int y, int z, T c)
 Change a single pixel in the given image.
 

Function Documentation

◆ allocateiAImage()

iAbase_API vtkSmartPointer< iAvtkImageData > allocateiAImage ( int vtkType,
int const dimensions[3],
double const spacing[3],
int numComponents )

allocate an iAvtkImageData image

◆ clearImage()

template<typename T >
void clearImage ( vtkImageData * img,
T c )

Set all pixels in the given image to the given value See the notes for drawPixel regarding Modified().

WARNING: Only tested for INT type at the moment!

◆ drawLine()

template<typename T >
void drawLine ( vtkImageData * img,
int x1,
int y1,
int x2,
int y2,
T c )

Draw a line in the given image.

See the notes for drawPixel regarding Modified(). WARNING: Only tested for INT type at the moment!

◆ drawPixel()

template<typename T >
void drawPixel ( vtkImageData * img,
int x,
int y,
int z,
T c )

Change a single pixel in the given image.

Don't forget to call Modified() on the image, and if the scalar range changed, to update the scalar range (unfortunately that seems to require a "dirty hack" at the moment, see iAvtkImageData above). WARNING: Only tested for INT type at the moment!