VTK
|
efficient description of an image stencil More...
#include <vtkImageStencilData.h>
Public Types | |
typedef vtkDataObject | Superclass |
![]() | |
typedef vtkObject | Superclass |
enum | FieldAssociations { FIELD_ASSOCIATION_POINTS, FIELD_ASSOCIATION_CELLS, FIELD_ASSOCIATION_NONE, FIELD_ASSOCIATION_POINTS_THEN_CELLS, FIELD_ASSOCIATION_VERTICES, FIELD_ASSOCIATION_EDGES, FIELD_ASSOCIATION_ROWS, NUMBER_OF_ASSOCIATIONS } |
enum | AttributeTypes { POINT, CELL, FIELD, POINT_THEN_CELL, VERTEX, EDGE, ROW, NUMBER_OF_ATTRIBUTE_TYPES } |
enum | FieldOperations { FIELD_OPERATION_PRESERVED, FIELD_OPERATION_REINTERPOLATED, FIELD_OPERATION_MODIFIED, FIELD_OPERATION_REMOVED } |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkImageStencilData * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | Initialize () |
void | DeepCopy (vtkDataObject *o) |
void | ShallowCopy (vtkDataObject *f) |
void | InternalImageStencilDataCopy (vtkImageStencilData *s) |
int | GetDataObjectType () |
int | GetExtentType () |
int | IsInside (int xIdx, int yIdx, int zIdx) |
void | InsertNextExtent (int r1, int r2, int yIdx, int zIdx) |
void | InsertAndMergeExtent (int r1, int r2, int yIdx, int zIdx) |
void | RemoveExtent (int r1, int r2, int yIdx, int zIdx) |
void | AllocateExtents () |
void | Fill () |
virtual void | CopyInformationFromPipeline (vtkInformation *meta_data) |
virtual void | Add (vtkImageStencilData *) |
virtual void | Subtract (vtkImageStencilData *) |
virtual void | Replace (vtkImageStencilData *) |
virtual int | Clip (int extent[6]) |
int | GetNextExtent (int &r1, int &r2, int xMin, int xMax, int yIdx, int zIdx, int &iter) |
virtual void | SetSpacing (double, double, double) |
virtual void | SetSpacing (double[3]) |
virtual double * | GetSpacing () |
virtual void | GetSpacing (double &, double &, double &) |
virtual void | GetSpacing (double[3]) |
virtual void | SetOrigin (double, double, double) |
virtual void | SetOrigin (double[3]) |
virtual double * | GetOrigin () |
virtual void | GetOrigin (double &, double &, double &) |
virtual void | GetOrigin (double[3]) |
void | SetExtent (int extent[6]) |
void | SetExtent (int x1, int x2, int y1, int y2, int z1, int z2) |
virtual int * | GetExtent () |
virtual void | GetExtent (int &, int &, int &, int &, int &, int &) |
virtual void | GetExtent (int[6]) |
![]() | |
vtkDataObject * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
unsigned long int | GetMTime () |
void | ReleaseData () |
unsigned long | GetUpdateTime () |
virtual unsigned long | GetActualMemorySize () |
void | DataHasBeenGenerated () |
virtual void | PrepareForNewData () |
virtual void | Crop (const int *updateExtent) |
virtual vtkDataSetAttributes * | GetAttributes (int type) |
virtual vtkFieldData * | GetAttributesAsFieldData (int type) |
virtual int | GetAttributeTypeForArray (vtkAbstractArray *arr) |
virtual vtkIdType | GetNumberOfElements (int type) |
virtual vtkInformation * | GetInformation () |
virtual void | SetInformation (vtkInformation *) |
virtual int | GetDataReleased () |
virtual void | SetFieldData (vtkFieldData *) |
virtual vtkFieldData * | GetFieldData () |
virtual void | CopyInformationFromPipeline (vtkInformation *vtkNotUsed(info)) |
void | GlobalReleaseDataFlagOn () |
void | GlobalReleaseDataFlagOff () |
Static Public Member Functions | |
static vtkImageStencilData * | New () |
static int | IsTypeOf (const char *type) |
static vtkImageStencilData * | SafeDownCast (vtkObjectBase *o) |
static vtkImageStencilData * | GetData (vtkInformation *info) |
static vtkImageStencilData * | GetData (vtkInformationVector *v, int i=0) |
![]() | |
static vtkDataObject * | New () |
static int | IsTypeOf (const char *type) |
static vtkDataObject * | SafeDownCast (vtkObjectBase *o) |
static const char * | GetAssociationTypeAsString (int associationType) |
static int | GetAssociationTypeFromString (const char *associationType) |
static vtkInformationStringKey * | DATA_TYPE_NAME () |
static vtkInformationDataObjectKey * | DATA_OBJECT () |
static vtkInformationIntegerKey * | DATA_EXTENT_TYPE () |
static vtkInformationIntegerPointerKey * | DATA_EXTENT () |
static vtkInformationIntegerKey * | DATA_PIECE_NUMBER () |
static vtkInformationIntegerKey * | DATA_NUMBER_OF_PIECES () |
static vtkInformationIntegerKey * | DATA_NUMBER_OF_GHOST_LEVELS () |
static vtkInformationDoubleKey * | DATA_RESOLUTION () |
static vtkInformationDoubleKey * | DATA_TIME_STEP () |
static vtkInformationInformationVectorKey * | POINT_DATA_VECTOR () |
static vtkInformationInformationVectorKey * | CELL_DATA_VECTOR () |
static vtkInformationInformationVectorKey * | VERTEX_DATA_VECTOR () |
static vtkInformationInformationVectorKey * | EDGE_DATA_VECTOR () |
static vtkInformationIntegerKey * | FIELD_ARRAY_TYPE () |
static vtkInformationIntegerKey * | FIELD_ASSOCIATION () |
static vtkInformationIntegerKey * | FIELD_ATTRIBUTE_TYPE () |
static vtkInformationIntegerKey * | FIELD_ACTIVE_ATTRIBUTE () |
static vtkInformationIntegerKey * | FIELD_NUMBER_OF_COMPONENTS () |
static vtkInformationIntegerKey * | FIELD_NUMBER_OF_TUPLES () |
static vtkInformationIntegerKey * | FIELD_OPERATION () |
static vtkInformationDoubleVectorKey * | FIELD_RANGE () |
static vtkInformationDoubleVectorKey * | PIECE_FIELD_RANGE () |
static vtkInformationStringKey * | FIELD_ARRAY_NAME () |
static vtkInformationIntegerVectorKey * | PIECE_EXTENT () |
static vtkInformationStringKey * | FIELD_NAME () |
static vtkInformationDoubleVectorKey * | ORIGIN () |
static vtkInformationDoubleVectorKey * | SPACING () |
static vtkInformationIntegerKey * | DATA_GEOMETRY_UNMODIFIED () |
static vtkInformationDoubleVectorKey * | BOUNDING_BOX () |
static vtkInformationDataObjectKey * | SIL () |
static vtkInformation * | GetActiveFieldInformation (vtkInformation *info, int fieldAssociation, int attributeType) |
static vtkInformation * | GetNamedFieldInformation (vtkInformation *info, int fieldAssociation, const char *name) |
static void | RemoveNamedFieldInformation (vtkInformation *info, int fieldAssociation, const char *name) |
static vtkInformation * | SetActiveAttribute (vtkInformation *info, int fieldAssociation, const char *attributeName, int attributeType) |
static void | SetActiveAttributeInfo (vtkInformation *info, int fieldAssociation, int attributeType, const char *name, int arrayType, int numComponents, int numTuples) |
static void | SetPointDataActiveScalarInfo (vtkInformation *info, int arrayType, int numComponents) |
static vtkDataObject * | GetData (vtkInformation *info) |
static vtkDataObject * | GetData (vtkInformationVector *v, int i=0) |
static void | SetGlobalReleaseDataFlag (int val) |
static int | GetGlobalReleaseDataFlag () |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkImageStencilData () | |
~vtkImageStencilData () | |
void | CopyOriginAndSpacingFromPipeline (vtkInformation *meta_data) |
virtual void | InternalAdd (vtkImageStencilData *) |
void | CollapseAdditionalIntersections (int r2, int idx, int *clist, int &clistlen) |
![]() | |
vtkDataObject () | |
~vtkDataObject () | |
Protected Attributes | |
int | Extent [6] |
double | Spacing [3] |
double | Origin [3] |
int | NumberOfExtentEntries |
int * | ExtentListLengths |
int ** | ExtentLists |
![]() | |
vtkFieldData * | FieldData |
int | DataReleased |
vtkTimeStamp | UpdateTime |
vtkInformation * | Information |
Friends | |
class | vtkImageStencilIteratorFriendship |
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.
Definition at line 40 of file vtkImageStencilData.h.
|
protected |
|
protected |
|
static |
|
static |
|
virtual |
Reimplemented from vtkDataObject.
|
static |
|
protectedvirtual |
Reimplemented from vtkDataObject.
vtkImageStencilData* vtkImageStencilData::NewInstance | ( | ) | const |
void vtkImageStencilData::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) |
|
virtual |
Restore data object to initial state,
Reimplemented from vtkDataObject.
|
virtual |
Shallow and Deep copy. These copy the data, but not any of the pipeline connections.
Reimplemented from vtkDataObject.
|
virtual |
Shallow and Deep copy. These copy the data, but not any of the pipeline connections.
Reimplemented from vtkDataObject.
void vtkImageStencilData::InternalImageStencilDataCopy | ( | vtkImageStencilData * | s | ) |
|
inlinevirtual |
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.
|
inlinevirtual |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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.
void vtkImageStencilData::SetExtent | ( | int | x1, |
int | x2, | ||
int | y1, | ||
int | y2, | ||
int | z1, | ||
int | z2 | ||
) |
Set the extent of the data. This is should be called only by vtkImageStencilSource, as it is part of the basic pipeline functionality.
|
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 |
Set the extent of the data. This is should be called only by vtkImageStencilSource, as it is part of the basic pipeline functionality.
|
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 |
Override these to handle origin, spacing, scalar type, and scalar number of components. See vtkDataObject for details.
|
static |
Retrieve an instance of this class from an information object.
|
static |
Retrieve an instance of this class from an information object.
|
virtual |
Add merges the stencil supplied as argument into Self.
|
virtual |
Subtract removes the portion of the stencil, supplied as argument, that lies within Self from Self.
|
virtual |
Replaces the portion of the stencil, supplied as argument, that lies within Self from Self.
|
virtual |
Clip the stencil with the supplied extents. In other words, discard data outside the specified extents. Return 1 if something changed.
|
protected |
Get important info from pipeline.
|
protectedvirtual |
Merges portions of the stencil that are within Self's extents into itself.
|
protected |
|
friend |
Definition at line 184 of file vtkImageStencilData.h.
|
protected |
The Spacing and Origin of the data.
Definition at line 167 of file vtkImageStencilData.h.
|
protected |
The Spacing and Origin of the data.
Definition at line 168 of file vtkImageStencilData.h.
|
protected |
Definition at line 171 of file vtkImageStencilData.h.
|
protected |
The actual 'data' is stored here.
Definition at line 175 of file vtkImageStencilData.h.
|
protected |
The actual 'data' is stored here.
Definition at line 176 of file vtkImageStencilData.h.
|
protected |
The actual 'data' is stored here.
Definition at line 177 of file vtkImageStencilData.h.