VTK
|
efficient description of an image stencil More...
#include <vtkImageStencilData.h>
efficient description of an image stencil
vtkImageStencilData describes an image stencil in a manner which is efficient both in terms of speed and storage space. The stencil extents are stored for each x-row across the image (multiple extents per row if necessary) and can be retrieved via the GetNextExtent() method.
Definition at line 36 of file vtkImageStencilData.h.
Reimplemented from vtkDataObject.
Definition at line 40 of file vtkImageStencilData.h.
vtkImageStencilData::vtkImageStencilData | ( | ) | [protected] |
vtkImageStencilData::~vtkImageStencilData | ( | ) | [protected] |
static vtkImageStencilData* vtkImageStencilData::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkDataObject.
static int vtkImageStencilData::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkDataObject.
virtual int vtkImageStencilData::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkDataObject.
static vtkImageStencilData* vtkImageStencilData::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkDataObject.
virtual vtkObjectBase* vtkImageStencilData::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkDataObject.
Reimplemented from vtkDataObject.
void vtkImageStencilData::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkDataObject.
void vtkImageStencilData::Initialize | ( | ) | [virtual] |
Restore data object to initial state,
Reimplemented from vtkDataObject.
void vtkImageStencilData::DeepCopy | ( | vtkDataObject * | src | ) | [virtual] |
Shallow and Deep copy. These copy the data, but not any of the pipeline connections.
Reimplemented from vtkDataObject.
void vtkImageStencilData::ShallowCopy | ( | vtkDataObject * | src | ) | [virtual] |
Shallow and Deep copy. These copy the data, but not any of the pipeline connections.
Reimplemented from vtkDataObject.
int vtkImageStencilData::GetDataObjectType | ( | ) | [inline, virtual] |
Get the data type as an integer (this will return VTK_DATA_OBJECT for now, maybe a proper type constant will be reserved later).
Reimplemented from vtkDataObject.
Definition at line 50 of file vtkImageStencilData.h.
int vtkImageStencilData::GetExtentType | ( | ) | [inline, virtual] |
The extent type is 3D, just like vtkImageData.
Reimplemented from vtkDataObject.
Definition at line 53 of file vtkImageStencilData.h.
int vtkImageStencilData::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,r2] that lies within within the unclipped region in sequence. A value of '0' is returned if no more sub-extents are available. The variable 'iter' must be initialized to zero before the first call, unless you want the complementary sub-extents in which case you must initialize 'iter' to -1. The variable 'iter' is used internally to keep track of which sub-extent should be returned next.
int vtkImageStencilData::IsInside | ( | int | xIdx, |
int | yIdx, | ||
int | zIdx | ||
) |
Checks if an index is inside the stencil. This can be faster than GetNextExtent if called on a voxel. If calling sequentially, along a scan line, the preferred way is to use GetNextExtent and then loop over the returned [r1,r2] extents.
void vtkImageStencilData::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,zIdx). The specified sub extent must not intersect any other sub extents along the same x row. As well, r1 and r2 must both be within the total x extent [Extent[0],Extent[1]].
void vtkImageStencilData::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 extents, (if any) on that row. So a unique extent may not necessarily be added. For instance, if an extent [5,11] already exists adding an extent, [7,9] will not affect the stencil. Likewise adding [10, 13] will replace the existing extent with [5,13].
void vtkImageStencilData::RemoveExtent | ( | int | r1, |
int | r2, | ||
int | yIdx, | ||
int | zIdx | ||
) |
Remove the extent from (r1,r2) at yIdx, zIdx
virtual void vtkImageStencilData::SetSpacing | ( | double | , |
double | , | ||
double | |||
) | [virtual] |
Set the desired spacing for the stencil. This must be called before the stencil is Updated, ideally in the ExecuteInformation method of the imaging filter that is using the stencil.
virtual void vtkImageStencilData::SetSpacing | ( | double | [3] | ) | [virtual] |
Set the desired spacing for the stencil. This must be called before the stencil is Updated, ideally in the ExecuteInformation method of the imaging filter that is using the stencil.
virtual double* vtkImageStencilData::GetSpacing | ( | ) | [virtual] |
Set the desired spacing for the stencil. This must be called before the stencil is Updated, ideally in the ExecuteInformation method of the imaging filter that is using the stencil.
virtual void vtkImageStencilData::GetSpacing | ( | double & | , |
double & | , | ||
double & | |||
) | [virtual] |
Set the desired spacing for the stencil. This must be called before the stencil is Updated, ideally in the ExecuteInformation method of the imaging filter that is using the stencil.
virtual void vtkImageStencilData::GetSpacing | ( | double | [3] | ) | [virtual] |
Set the desired spacing for the stencil. This must be called before the stencil is Updated, ideally in the ExecuteInformation method of the imaging filter that is using the stencil.
virtual void vtkImageStencilData::SetOrigin | ( | double | , |
double | , | ||
double | |||
) | [virtual] |
Set the desired origin for the stencil. This must be called before the stencil is Updated, ideally in the ExecuteInformation method of the imaging filter that is using the stencil.
virtual void vtkImageStencilData::SetOrigin | ( | double | [3] | ) | [virtual] |
Set the desired origin for the stencil. This must be called before the stencil is Updated, ideally in the ExecuteInformation method of the imaging filter that is using the stencil.
virtual double* vtkImageStencilData::GetOrigin | ( | ) | [virtual] |
Set the desired origin for the stencil. This must be called before the stencil is Updated, ideally in the ExecuteInformation method of the imaging filter that is using the stencil.
virtual void vtkImageStencilData::GetOrigin | ( | double & | , |
double & | , | ||
double & | |||
) | [virtual] |
Set the desired origin for the stencil. This must be called before the stencil is Updated, ideally in the ExecuteInformation method of the imaging filter that is using the stencil.
virtual void vtkImageStencilData::GetOrigin | ( | double | [3] | ) | [virtual] |
Set the desired origin for the stencil. This must be called before the stencil is Updated, ideally in the ExecuteInformation method of the imaging filter that is using the stencil.
void vtkImageStencilData::SetExtent | ( | int | extent[6] | ) |
Set the extent of the data. This is should be called only by vtkImageStencilSource, as it is part of the basic pipeline functionality.
Set the extent of the data. This is should be called only by vtkImageStencilSource, as it is part of the basic pipeline functionality.
virtual int* vtkImageStencilData::GetExtent | ( | ) | [virtual] |
Set the extent of the data. This is should be called only by vtkImageStencilSource, as it is part of the basic pipeline functionality.
virtual void vtkImageStencilData::GetExtent | ( | int & | , |
int & | , | ||
int & | , | ||
int & | , | ||
int & | , | ||
int & | |||
) | [virtual] |
Set the extent of the data. This is should be called only by vtkImageStencilSource, as it is part of the basic pipeline functionality.
virtual void vtkImageStencilData::GetExtent | ( | int | [6] | ) | [virtual] |
Set the extent of the data. This is should be called only by vtkImageStencilSource, as it is part of the basic pipeline functionality.
void vtkImageStencilData::AllocateExtents | ( | ) |
Allocate space for the sub-extents. This is called by vtkImageStencilSource.
void vtkImageStencilData::Fill | ( | ) |
Fill the sub-extents.
virtual void vtkImageStencilData::CopyInformationFromPipeline | ( | vtkInformation * | meta_data | ) | [virtual] |
Override these to handle origin, spacing, scalar type, and scalar number of components. See vtkDataObject for details.
static vtkImageStencilData* vtkImageStencilData::GetData | ( | vtkInformation * | info | ) | [static] |
Retrieve an instance of this class from an information object.
Reimplemented from vtkDataObject.
static vtkImageStencilData* vtkImageStencilData::GetData | ( | vtkInformationVector * | v, |
int | i = 0 |
||
) | [static] |
Retrieve an instance of this class from an information object.
Reimplemented from vtkDataObject.
virtual void vtkImageStencilData::Add | ( | vtkImageStencilData * | ) | [virtual] |
Add merges the stencil supplied as argument into Self.
virtual void vtkImageStencilData::Subtract | ( | vtkImageStencilData * | ) | [virtual] |
Subtract removes the portion of the stencil, supplied as argument, that lies within Self from Self.
virtual void vtkImageStencilData::Replace | ( | vtkImageStencilData * | ) | [virtual] |
Replaces the portion of the stencil, supplied as argument, that lies within Self from Self.
virtual int vtkImageStencilData::Clip | ( | int | extent[6] | ) | [virtual] |
Clip the stencil with the supplied extents. In other words, discard data outside the specified extents. Return 1 if something changed.
void vtkImageStencilData::CopyOriginAndSpacingFromPipeline | ( | vtkInformation * | meta_data | ) | [protected] |
Get important info from pipeline.
virtual void vtkImageStencilData::InternalAdd | ( | vtkImageStencilData * | ) | [protected, virtual] |
Merges portions of the stencil that are within Self's extents into itself.
void vtkImageStencilData::CollapseAdditionalIntersections | ( | int | r2, |
int | idx, | ||
int * | clist, | ||
int & | clistlen | ||
) | [protected] |
friend class vtkImageStencilIteratorFriendship [friend] |
Definition at line 184 of file vtkImageStencilData.h.
double vtkImageStencilData::Spacing[3] [protected] |
The Spacing and Origin of the data.
Definition at line 167 of file vtkImageStencilData.h.
double vtkImageStencilData::Origin[3] [protected] |
The Spacing and Origin of the data.
Definition at line 168 of file vtkImageStencilData.h.
int vtkImageStencilData::Extent[6] [protected] |
Definition at line 171 of file vtkImageStencilData.h.
int vtkImageStencilData::NumberOfExtentEntries [protected] |
The actual 'data' is stored here.
Definition at line 175 of file vtkImageStencilData.h.
int* vtkImageStencilData::ExtentListLengths [protected] |
The actual 'data' is stored here.
Definition at line 176 of file vtkImageStencilData.h.
int** vtkImageStencilData::ExtentLists [protected] |
The actual 'data' is stored here.
Definition at line 177 of file vtkImageStencilData.h.