Go to the documentation of this file.
30 #ifndef vtkImageStencilData_h
31 #define vtkImageStencilData_h
34 #include "vtkImagingCoreModule.h"
70 int yIdx,
int zIdx,
int &iter);
111 vtkSetVector3Macro(Spacing,
double);
112 vtkGetVector3Macro(Spacing,
double);
122 vtkSetVector3Macro(Origin,
double);
123 vtkGetVector3Macro(Origin,
double);
133 void SetExtent(
int x1,
int x2,
int y1,
int y2,
int z1,
int z2);
134 vtkGetVector6Macro(Extent,
int);
198 int r1,
int r2,
int yIdx,
int zIdx,
Operation operation);
241 friend class vtkImageStencilIteratorFriendship;
275 VTK_LEGACY(
void InsertLine(
const double[2],
const double[2],
bool,
bool));
283 int xj = 0,
int yj = 1);
static vtkImageStencilData * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
virtual void Subtract(vtkImageStencilData *)
Subtract removes the portion of the stencil, supplied as argument, that lies within Self from Self.
int GetDataObjectType() override
Get the data type as an integer (this will return VTK_DATA_OBJECT for now, maybe a proper type consta...
int NumberOfExtentEntries
The actual 'data' is stored here.
void CopyOriginAndSpacingFromPipeline(vtkInformation *info)
Get important info from pipeline.
int IsInside(int xIdx, int yIdx, int zIdx)
Checks if an image index is inside the stencil.
void SetTolerance(double tol)
The tolerance for float-to-int conversions.
int GetNextExtent(int &r1, int &r2, int xMin, int xMax, int yIdx, int zIdx, int &iter)
Given the total output x extent [xMin,xMax] and the current y, z indices, return each sub-extent [r1,...
void InsertAndMergeExtent(int r1, int r2, int yIdx, int zIdx)
Similar to InsertNextExtent, except that the extent (r1,r2) at yIdx, zIdx is merged with other extent...
virtual void Replace(vtkImageStencilData *)
Replaces the portion of the stencil, supplied as argument, that lies within Self from Self.
void DeepCopy(vtkDataObject *o) override
void InsertLine(const double[2], const double[2], bool, bool)
void PrepareExtent(int ymin, int ymax)
Ensure that the raster is initialized for the specified range of y values, which must be within the E...
static vtkImageStencilData * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
This is a helper class for stencil creation.
int GetExtentType() override
The extent type is 3D, just like vtkImageData.
void SetExtent(const int extent[6])
Set the extent of the data.
~vtkImageStencilRaster()
Destructor.
static vtkImageStencilData * GetData(vtkInformationVector *v, int i=0)
void LogicalOperationExtent(int r1, int r2, int yIdx, int zIdx, Operation operation)
Apply the given operation over the given (r1, r2) extent.
void SetExtent(int x1, int x2, int y1, int y2, int z1, int z2)
void InsertNextExtent(int r1, int r2, int yIdx, int zIdx)
This method is used by vtkImageStencilDataSource to add an x sub extent [r1,r2] for the x row (yIdx,...
void InsertPoint(int y, double x, int i)
Insert an x point into the raster.
a simple class to control print indentation
vtkImageStencilRaster(const int wholeExtent[2])
Create a raster with the specified whole y extent.
void LogicalOperationInPlace(vtkImageStencilData *stencil, Operation operation)
Combine with the given stencil, using the given operation.
virtual void Add(vtkImageStencilData *)
Add merges the stencil supplied as argument into Self.
void PrepareForNewData(const int allocateExtent[2]=nullptr)
Reset the raster to its original state, but keep the same whole extent.
void Initialize() override
Restore data object to initial state,.
void CopyInformationFromPipeline(vtkInformation *info) override
Override these to handle origin, spacing, scalar type, and scalar number of components.
void InsertLine(const double p1[2], const double p2[2])
Insert a line into the raster, given the two end points.
void ShallowCopy(vtkDataObject *f) override
Shallow and Deep copy.
void RemoveExtent(int r1, int r2, int yIdx, int zIdx)
Remove the extent from (r1,r2) at yIdx, zIdx.
efficient description of an image stencil
void CopyInformationToPipeline(vtkInformation *info) override
~vtkImageStencilData() override
general representation of visualization data
void AllocateExtents()
Allocate space for the sub-extents.
void ChangeExtent(const int extent[6])
Change the extent while preserving the data.
void Fill()
Fill the sub-extents.
void InternalImageStencilDataCopy(vtkImageStencilData *s)
void FillStencilData(vtkImageStencilData *data, const int extent[6], int xj=0, int yj=1)
Fill the specified extent of a vtkImageStencilData with the raster, after permuting the raster accord...
virtual int Clip(int extent[6])
Clip the stencil with the supplied extents.