#include <itkSpatialObject.h>
Inheritance diagram for itk::SpatialObject:
Public Types | |
typedef double | ScalarType |
typedef SpatialObject< TDimension > | Self |
typedef DataObject | Superclass |
typedef SmartPointer< Self > | Pointer |
typedef SmartPointer< const Self > | ConstPointer |
typedef Point< ScalarType, TDimension > | PointType |
typedef PointType * | PointPointer |
typedef Vector< ScalarType, TDimension > | VectorType |
typedef VectorType * | VectorPointer |
typedef CovariantVector< double, TDimension > | OutputVectorType |
typedef OutputVectorType * | OutputVectorPointer |
typedef AffineTransform< double, TDimension > | TransformType |
typedef TransformType::Pointer | TransformPointer |
typedef const TransformType * | TransformConstPointer |
typedef std::list< TransformType * > | TransformListType |
typedef VectorContainer< unsigned long int, PointType > | VectorContainerType |
typedef BoundingBox< unsigned long int, TDimension, ScalarType, VectorContainerType > | BoundingBoxType |
typedef BoundingBoxType::Pointer | BoundingBoxPointer |
typedef std::list< Self * > | ChildrenListType |
typedef ChildrenListType * | ChildrenListPointer |
typedef Index< TDimension > | IndexType |
typedef IndexType::IndexValueType | IndexValueType |
typedef Offset< TDimension > | OffsetType |
typedef OffsetType::OffsetValueType | OffsetValueType |
typedef ImageRegion< TDimension > | RegionType |
typedef Size< TDimension > | SizeType |
typedef SpatialObjectProperty< float > | PropertyType |
typedef PropertyType::Pointer | PropertyPointer |
Public Methods | |
itkStaticConstMacro (MaximumDepth, unsigned int, 9999999) | |
virtual bool | HasParent (void) const |
virtual const char * | GetTypeName (void) const |
itkStaticConstMacro (ObjectDimension, unsigned int, TDimension) | |
virtual const char * | GetClassName () const |
void | SetBoundingBox (BoundingBoxPointer bounds) |
virtual BoundingBoxType * | GetBoundingBox (void) const |
virtual bool | ValueAt (const PointType &point, double &value, unsigned int depth=0, char *name=NULL) const |
virtual bool | IsEvaluableAt (const PointType &point, unsigned int depth=0, char *name=NULL) const |
virtual bool | IsInside (const PointType &point, unsigned int depth=0, char *name=NULL) const |
void | SetParent (const Self *parent) |
void | DerivativeAt (const PointType &point, short unsigned int order, OutputVectorType &value, unsigned int depth=0, char *name=NULL) |
void | TransformPointToLocalCoordinate (PointType &p) const |
void | TransformPointToGlobalCoordinate (PointType &p) const |
TransformListType & | GetGlobalTransformList (void) |
void | SetSpacing (const double spacing[ObjectDimension]) |
void | SetScale (const double scale[ObjectDimension]) |
const double * | GetSpacing () const |
const double * | GetScale () const |
const double * | GetGlobalScale () const |
unsigned long | GetMTime (void) const |
void | ComputeGlobalTransform (void) |
void | ComputeTransform (void) |
void | AddSpatialObject (Self *pointer) |
void | RemoveSpatialObject (Self *object) |
virtual const Self * | GetParent (void) const |
virtual ChildrenListType * | GetChildren (unsigned int depth=0, char *name=NULL) const |
unsigned int | GetNumberOfChildren (unsigned int depth=0, char *name=NULL) |
void | SetChildren (ChildrenListType &children) |
virtual void | Clear (void) |
unsigned long | GetTransformMTime (void) |
unsigned long | GetGlobalTransformMTime (void) |
virtual void | SetLargestPossibleRegion (const RegionType ®ion) |
virtual const RegionType & | GetLargestPossibleRegion () const |
virtual void | SetBufferedRegion (const RegionType ®ion) |
virtual const RegionType & | GetBufferedRegion () const |
virtual void | SetRequestedRegion (const RegionType ®ion) |
virtual void | SetRequestedRegion (DataObject *data) |
virtual const RegionType & | GetRequestedRegion () const |
virtual void | Update (void) |
void | SetTransform (TransformType *transform) |
TransformType * | GetTransform (void) |
const TransformType * | GetTransform (void) const |
void | SetGlobalTransform (TransformType *transform) |
TransformType * | GetGlobalTransform (void) |
const TransformType * | GetGlobalTransform (void) const |
virtual void | SetCenterOfRotation (PointType _arg) |
virtual PointType | GetCenterOfRotation () |
virtual bool | ComputeBoundingBox (unsigned int depth=0, char *name=NULL) |
const OffsetValueType * | GetOffsetTable () const |
OffsetValueType | ComputeOffset (const IndexType &ind) const |
IndexType | ComputeIndex (OffsetValueType offset) const |
virtual void | CopyInformation (const DataObject *data) |
virtual void | UpdateOutputInformation () |
virtual void | SetRequestedRegionToLargestPossibleRegion () |
virtual bool | RequestedRegionIsOutsideOfTheBufferedRegion () |
virtual bool | VerifyRequestedRegion () |
PropertyType * | GetProperty (void) |
void | SetProperty (const PropertyType *property) |
void | SetParentId (int parentid) |
int | GetParentId (void) |
virtual int | GetId () const |
virtual void | SetId (int _arg) |
Static Public Methods | |
Pointer | New () |
Protected Methods | |
SpatialObject () | |
virtual | ~SpatialObject () |
virtual void | PrintSelf (std::ostream &os, Indent indent) const |
void | ComputeOffsetTable () |
Protected Attributes | |
BoundingBoxPointer | m_Bounds |
unsigned long | m_BoundsMTime |
double | m_Spacing [ObjectDimension] |
double | m_Scale [ObjectDimension] |
double | m_GlobalScale [ObjectDimension] |
PointType | m_CenterOfRotation |
TransformListType | m_GlobalTransformList |
TransformPointer | m_Transform |
TransformPointer | m_TransformWithCoR |
TransformPointer | m_GlobalTransform |
ChildrenListType | m_Children |
const Self * | m_Parent |
char | m_TypeName [255] |
unsigned int | m_Dimension |
double | m_OffsetTable [3+1] |
RegionType | m_LargestPossibleRegion |
RegionType | m_RequestedRegion |
RegionType | m_BufferedRegion |
PropertyPointer | m_Property |
int | m_ParentId |
int | m_Id |
The purpose of this class is to implement the composite pattern within itk, so that it becomes easy to create an environment, and to manipulate the environment as a whole or any of its components. An object has a list of transformations to transform local coordinates to the corresponding coordinates in the real world coordinate system, and a list of inverse transformation to go backward. Any spatial objects can be plugged to a spatial object as children. To implement your own spatial object, you need to derive from the following class, which requires the definition of just a few pure virtual functions. Examples of such functions are ValueAt(), IsEvaluableAt(), and IsInside(), each of which has a meaning specific to each particular object type.
Definition at line 59 of file itkSpatialObject.h.
|
Definition at line 94 of file itkSpatialObject.h. Referenced by itk::SpatialObject< TDimension >::GetParentId(). |
|
Reimplemented in itk::ImageSpatialObject< TDimension, PixelType >. Definition at line 93 of file itkSpatialObject.h. |
|
Definition at line 97 of file itkSpatialObject.h. |
|
Definition at line 96 of file itkSpatialObject.h. |
|
|
Index typedef support. An index is used to access pixel values. Reimplemented in itk::ImageSpatialObject< TDimension, PixelType >. Definition at line 100 of file itkSpatialObject.h. |
|
Definition at line 101 of file itkSpatialObject.h. |
|
Offset typedef support. An offset represent relative position between indices. Definition at line 105 of file itkSpatialObject.h. |
|
Definition at line 106 of file itkSpatialObject.h. Referenced by itk::SpatialObject< TDimension >::GetOffsetTable(). |
|
Definition at line 82 of file itkSpatialObject.h. |
|
Definition at line 81 of file itkSpatialObject.h. |
|
|
Definition at line 76 of file itkSpatialObject.h. |
|
|
Definition at line 110 of file itkSpatialObject.h. |
|
Definition at line 109 of file itkSpatialObject.h. |
|
Reimplemented in itk::ImageSpatialObject< TDimension, PixelType >. Definition at line 107 of file itkSpatialObject.h. |
|
|
Standard class typedefs. Reimplemented from itk::DataObject. Reimplemented in itk::BlobSpatialObject< TDimension >, itk::EllipseSpatialObject< TDimension >, itk::GroupSpatialObject< TDimension >, itk::ImageSpatialObject< TDimension, PixelType >, itk::LandmarkSpatialObject< TDimension >, itk::LineSpatialObject< TDimension >, itk::PlaneSpatialObject< TDimension >, itk::SurfaceSpatialObject< TDimension >, and itk::TubeSpatialObject< TDimension >. Definition at line 69 of file itkSpatialObject.h. |
|
Definition at line 108 of file itkSpatialObject.h. |
|
|
Definition at line 86 of file itkSpatialObject.h. |
|
Definition at line 88 of file itkSpatialObject.h. |
|
Definition at line 85 of file itkSpatialObject.h. Referenced by itk::SpatialObject< TDimension >::GetParentId(). |
|
Definition at line 84 of file itkSpatialObject.h. |
|
Definition at line 90 of file itkSpatialObject.h. |
|
Definition at line 79 of file itkSpatialObject.h. |
|
Reimplemented in itk::TubeSpatialObject< TDimension >. Definition at line 78 of file itkSpatialObject.h. |
|
Constructor. |
|
Destructor. |
|
Add an object to the list of children. |
|
Clear the spatial object by deleting all lists of children and subchildren Reimplemented in itk::TubeSpatialObject< TDimension >. |
|
Compute an axis-aligned bounding box for the object and its selected children, down to a specified depth. After computation, the resulting bounding box is stored in This function has to be implemented in the deriving class.
Reimplemented in itk::BlobSpatialObject< TDimension >, itk::EllipseSpatialObject< TDimension >, itk::ImageSpatialObject< TDimension, PixelType >, itk::LandmarkSpatialObject< TDimension >, itk::LineSpatialObject< TDimension >, itk::PlaneSpatialObject< TDimension >, itk::SurfaceSpatialObject< TDimension >, and itk::TubeSpatialObject< TDimension >. |
|
Compute the Global transform when the local transform is set This function should be called each time the local transform has been modified |
|
Compute the index of the pixel at a specified offset from the beginning of the buffered region. Definition at line 364 of file itkSpatialObject.h. References itk::SpatialObject< TDimension >::m_OffsetTable. |
|
Compute an offset from the beginning of the buffer for a pixel at the specified index. Definition at line 344 of file itkSpatialObject.h. References itk::SpatialObject< TDimension >::m_OffsetTable. |
|
Calculate the offsets needed to move from one pixel to the next along a row, column, slice, volume, etc. These offsets are based on the size of the BufferedRegion. This should be called after the BufferedRegion is set. |
|
Compute the Local transform when the global transform is set |
|
Copy information from the specified data set. This method is part of the pipeline execution model. By default, a ProcessObject will copy meta-data from the first input to all of its outputs. See ProcessObject::GenerateOutputInformation(). Each subclass of DataObject is responsible for being able to copy whatever meta-data it needs from from another DataObject. ImageBase has more meta-data than its DataObject. Thus, it must provide its own version of CopyInformation() in order to copy the LargestPossibleRegion from the input parameter. Reimplemented from itk::DataObject. |
|
Return the n-th order derivative value at the specified point. |
|
Get the bounding box of the object. |
|
Get the region object that defines the size and starting index of the region of the image currently loaded in memory.
Definition at line 308 of file itkSpatialObject.h. |
|
Set the center of the rotation |
|
Returns a list of pointer to the children affiliated to this object. A depth of 0 returns the immediate childred. A depth of 1 returns the children and those children's children. |
|
Run-time type information (and related methods). Reimplemented from itk::DataObject. Reimplemented in itk::BlobSpatialObject< TDimension >, itk::EllipseSpatialObject< TDimension >, itk::GroupSpatialObject< TDimension >, itk::ImageSpatialObject< TDimension, PixelType >, itk::LandmarkSpatialObject< TDimension >, itk::LineSpatialObject< TDimension >, itk::PlaneSpatialObject< TDimension >, itk::SurfaceSpatialObject< TDimension >, and itk::TubeSpatialObject< TDimension >. |
|
Get the spacing of the spatial object Definition at line 234 of file itkSpatialObject.h. References itk::SpatialObject< TDimension >::m_LargestPossibleRegion. |
|
This defines the transformation from the global coordinate frame. By setting this transform, the local transform is computed |
|
This defines the transformation from the global coordinate frame. By setting this transform, the local transform is computed |
|
Returns the list of local to global transforms |
|
Return the Modified time of the GlobalToLocalTransform |
|
Get/Set the ID |
|
Get the region object that defines the size and starting index for the largest possible region this image could represent. This is used in determining how much memory would be needed to load an entire dataset. It is also used to determine boundary conditions.
Definition at line 297 of file itkSpatialObject.h. |
|
Returns the latest modified time of the spatial object, and any of its components. Reimplemented from itk::Object. Reimplemented in itk::ImageSpatialObject< TDimension, PixelType >. |
|
Returns the number of children currently assigned to the object. |
|
Get the offset table. The offset table gives increments for moving from one pixel to next in the current row, column, slice, etc.. This table if of size [VImageDimension+1], because its values are computed progressively as: {1, N1, N1*N2, N1*N2*N3,...,(N1*...*Nn)} Where the values {N1,...,Nn} are the elements of the BufferedRegion::Size array. The last element of the OffsetTable is equivalent to the BufferSize. Having a [VImageDimension+1] size array, simplifies the implementation of some data accessing algorithms. Definition at line 339 of file itkSpatialObject.h. References itk::SpatialObject< TDimension >::m_BufferedRegion, and itk::SpatialObject< TDimension >::OffsetValueType. |
|
Return a pointer to the parent object in the hierarchy tree |
|
Compute an offset from the beginning of the buffer for a pixel at the specified index. Definition at line 436 of file itkSpatialObject.h. References itk::SpatialObject< TDimension >::BoundingBoxPointer, itk::SpatialObject< TDimension >::m_Bounds, itk::SpatialObject< TDimension >::m_BoundsMTime, itk::SpatialObject< TDimension >::m_CenterOfRotation, itk::SpatialObject< TDimension >::m_GlobalScale, itk::SpatialObject< TDimension >::m_GlobalTransformList, itk::SpatialObject< TDimension >::m_Scale, itk::SpatialObject< TDimension >::m_Spacing, itk::SpatialObject< TDimension >::m_Transform, and itk::SpatialObject< TDimension >::TransformPointer. |
|
Returns a pointer to the property object applied to this class. |
|
Get the region object that defines the size and starting index for the region of the image requested (i.e., the region of the image to be operated on by a filter).
Definition at line 327 of file itkSpatialObject.h. |
|
Get the spacing of the spatial object Definition at line 231 of file itkSpatialObject.h. |
|
Get the spacing of the spatial object Definition at line 228 of file itkSpatialObject.h. References itk::SpatialObject< TDimension >::m_GlobalScale. |
|
This is the transform applied from the origin of the parent if the origin of the child is different from the origin of the parent (i.e. m_Origin) then the transformation is applied from this origin this origin is transformed by the parent's transform before applying any transformation |
|
This is the transform applied from the origin of the parent if the origin of the child is different from the origin of the parent (i.e. m_Origin) then the transformation is applied from this origin this origin is transformed by the parent's transform before applying any transformation |
|
Return the Modified time of the LocalToGlobalTransform |
|
Get the typename of the SpatialObject Definition at line 117 of file itkSpatialObject.h. References itk::SpatialObject< TDimension >::m_TypeName. |
|
Return true if the object has a parent object. Basically, only the root object , or some isolated objects should return false. |
|
Return tru if the object provides a method to evaluate the value at the specified point, else otherwise. Reimplemented in itk::BlobSpatialObject< TDimension >, itk::EllipseSpatialObject< TDimension >, itk::ImageSpatialObject< TDimension, PixelType >, itk::LandmarkSpatialObject< TDimension >, itk::LineSpatialObject< TDimension >, itk::PlaneSpatialObject< TDimension >, itk::SurfaceSpatialObject< TDimension >, and itk::TubeSpatialObject< TDimension >. |
|
Test whether a point is inside or outside the object. Reimplemented in itk::BlobSpatialObject< TDimension >, itk::EllipseSpatialObject< TDimension >, itk::ImageSpatialObject< TDimension, PixelType >, itk::LandmarkSpatialObject< TDimension >, itk::LineSpatialObject< TDimension >, itk::PlaneSpatialObject< TDimension >, itk::SurfaceSpatialObject< TDimension >, and itk::TubeSpatialObject< TDimension >. |
|
Dimension of the object. This constant is used by functions that are templated over spatialObject type when they need compile time access to the dimension of the object. |
|
|
|
Method for creation through the object factory. Reimplemented from itk::Object. Reimplemented in itk::BlobSpatialObject< TDimension >, itk::EllipseSpatialObject< TDimension >, itk::GroupSpatialObject< TDimension >, itk::ImageSpatialObject< TDimension, PixelType >, itk::LandmarkSpatialObject< TDimension >, itk::LineSpatialObject< TDimension >, itk::PlaneSpatialObject< TDimension >, itk::SurfaceSpatialObject< TDimension >, and itk::TubeSpatialObject< TDimension >. |
|
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 itk::DataObject. Reimplemented in itk::BlobSpatialObject< TDimension >, itk::EllipseSpatialObject< TDimension >, itk::GroupSpatialObject< TDimension >, itk::ImageSpatialObject< TDimension, PixelType >, itk::LandmarkSpatialObject< TDimension >, itk::LineSpatialObject< TDimension >, itk::PlaneSpatialObject< TDimension >, itk::SurfaceSpatialObject< TDimension >, and itk::TubeSpatialObject< TDimension >. |
|
Remove the object passed as arguments from the list of children. May this function should return a false value if the object to remove is not found in the list. |
|
Determine whether the RequestedRegion is outside of the BufferedRegion. This method returns true if the RequestedRegion is outside the BufferedRegion (true if at least one pixel is outside). This is used by the pipeline mechanism to determine whether a filter needs to re-execute in order to satisfy the current request. If the current RequestedRegion is already inside the BufferedRegion from the previous execution (and the current filter is up to date), then a given filter does not need to re-execute Implements itk::DataObject. |
|
Set the bounding box of the object. |
|
Set the region object that defines the size and starting index of the region of the image currently loaded in memory.
|
|
Set the center of the rotation |
|
Set the list of pointers to children to the list passed as argument. |
|
This defines the transformation from the global coordinate frame. By setting this transform, the local transform is computed |
|
Get/Set the ID |
|
Set the region object that defines the size and starting index for the largest possible region this image could represent. This is used in determining how much memory would be needed to load an entire dataset. It is also used to determine boundary conditions.
|
|
Set the pointer to the parent object in the tree hierarchy used for the spatial object patter. |
|
Get/Set the ParentID Definition at line 435 of file itkSpatialObject.h. |
|
Set the property applied to the object. |
|
Set the requested region from this data object to match the requested region of the data object passed in as a parameter. This method implements the API from DataObject. The data object parameter must be castable to an ImageBase. Implements itk::DataObject. |
|
Set the region object that defines the size and starting index for the region of the image requested (i.e., the region of the image to be operated on by a filter).
|
|
Set the RequestedRegion to the LargestPossibleRegion. This forces a filter to produce all of the output in one execution (i.e. not streaming) on the next call to Update(). Implements itk::DataObject. |
|
Set the Scale of the spatial object |
|
Set the Spacing of the spatial object |
|
This is the transform applied from the origin of the parent if the origin of the child is different from the origin of the parent (i.e. m_Origin) then the transformation is applied from this origin this origin is transformed by the parent's transform before applying any transformation |
|
Returns the coordinates of the point passed as argument in the object local coordinate system. |
|
Returns the coordinates of the point passed as argument in the object local coordinate system. |
|
Specify that the object has been updated Reimplemented from itk::DataObject. |
|
Update the information for this DataObject so that it can be used as an output of a ProcessObject. This method is used the pipeline mechanism to propagate information and initialize the meta data associated with a DataObject. This method calls its source's ProcessObject::UpdateOutputInformation() which determines modified times, LargestPossibleRegions, and any extra meta data like spacing, origin, etc. Implements itk::DataObject. |
|
Returns a degree of membership to the object. That's useful for fuzzy objects. Reimplemented in itk::BlobSpatialObject< TDimension >, itk::EllipseSpatialObject< TDimension >, itk::ImageSpatialObject< TDimension, PixelType >, itk::LandmarkSpatialObject< TDimension >, itk::LineSpatialObject< TDimension >, itk::PlaneSpatialObject< TDimension >, itk::SurfaceSpatialObject< TDimension >, and itk::TubeSpatialObject< TDimension >. |
|
Verify that the RequestedRegion is within the LargestPossibleRegion. If the RequestedRegion is not within the LargestPossibleRegion, then the filter cannot possible satisfy the request. This method returns true if the request can be satisfied and returns fails if the request cannot. This method is used by PropagateRequestedRegion(). PropagateRequestedRegion() throws a InvalidRequestedRegionError exception is the requested region is not within the LargestPossibleRegion. Implements itk::DataObject. |
|
Definition at line 450 of file itkSpatialObject.h. Referenced by itk::SpatialObject< TDimension >::GetParentId(). |
|
Definition at line 451 of file itkSpatialObject.h. Referenced by itk::SpatialObject< TDimension >::GetParentId(). |
|
Definition at line 490 of file itkSpatialObject.h. Referenced by itk::SpatialObject< TDimension >::GetOffsetTable(). |
|
Definition at line 455 of file itkSpatialObject.h. Referenced by itk::SpatialObject< TDimension >::GetParentId(). |
|
List of the children object plug to the composite spatial object. Definition at line 472 of file itkSpatialObject.h. |
|
Definition at line 484 of file itkSpatialObject.h. |
|
Definition at line 454 of file itkSpatialObject.h. Referenced by itk::SpatialObject< TDimension >::GetParentId(), and itk::SpatialObject< TDimension >::GetSpacing(). |
|
Definition at line 460 of file itkSpatialObject.h. |
|
Definition at line 456 of file itkSpatialObject.h. Referenced by itk::SpatialObject< TDimension >::GetParentId(). |
|
Object Identification Number Definition at line 499 of file itkSpatialObject.h. |
|
Definition at line 488 of file itkSpatialObject.h. Referenced by itk::SpatialObject< TDimension >::GetGlobalScale(). |
|
Definition at line 486 of file itkSpatialObject.h. Referenced by itk::SpatialObject< TDimension >::ComputeIndex(), and itk::SpatialObject< TDimension >::ComputeOffset(). |
|
Definition at line 480 of file itkSpatialObject.h. |
|
Parent ID : default = -1 Definition at line 496 of file itkSpatialObject.h. |
|
Definition at line 493 of file itkSpatialObject.h. |
|
Definition at line 489 of file itkSpatialObject.h. |
|
Definition at line 453 of file itkSpatialObject.h. Referenced by itk::SpatialObject< TDimension >::GetParentId(). |
|
Definition at line 452 of file itkSpatialObject.h. Referenced by itk::SpatialObject< TDimension >::GetParentId(). |
|
Definition at line 458 of file itkSpatialObject.h. Referenced by itk::SpatialObject< TDimension >::GetParentId(). |
|
Definition at line 459 of file itkSpatialObject.h. |
|
Definition at line 482 of file itkSpatialObject.h. Referenced by itk::SpatialObject< TDimension >::GetTypeName(). |