18 #ifndef __itkSpatialObject_h
19 #define __itkSpatialObject_h
55 template<
unsigned int VDimension >
58 template<
unsigned int VDimension = 3 >
150 itkGetModifiableObjectMacro(ObjectToWorldTransform,
TransformType);
153 itkGetModifiableObjectMacro(IndexToWorldTransform,
TransformType);
171 unsigned int depth = 0,
172 char *name = ITK_NULLPTR)
const;
181 unsigned int depth = 0,
182 char *name = ITK_NULLPTR)
const;
186 unsigned int depth = 0,
187 char *name = ITK_NULLPTR)
const;
200 short unsigned int order,
202 unsigned int depth = 0,
203 char *name = ITK_NULLPTR);
286 for (
int i = VDimension - 1; i > 0; i-- )
288 offset += ( ind[i] - bufferedRegionIndex[i] ) *
m_OffsetTable[i];
290 offset += ( ind[0] - bufferedRegionIndex[0] );
303 for (
int i = VDimension - 1; i > 0; i-- )
307 index[i] += bufferedRegionIndex[i];
309 index[0] = bufferedRegionIndex[0] +
static_cast< IndexValueType >( offset );
369 itkGetConstReferenceMacro(Id,
int);
370 itkSetMacro(Id,
int);
374 itkSetMacro(ParentId,
int);
375 itkGetConstReferenceMacro(ParentId,
int);
379 virtual void Update(
void) ITK_OVERRIDE;
459 char *name = ITK_NULLPTR)
const;
463 char *name = ITK_NULLPTR)
const;
470 virtual void Clear(
void);
498 std::cerr <<
"SpatialObject::ComputeLocalBoundingBox Not Implemented!"
508 itkSetMacro(BoundingBoxChildrenDepth,
unsigned int);
509 itkGetConstReferenceMacro(BoundingBoxChildrenDepth,
unsigned int);
514 itkSetMacro(BoundingBoxChildrenName, std::string);
515 itkGetConstReferenceMacro(BoundingBoxChildrenName, std::string);
531 itkSetMacro(DefaultInsideValue,
double);
532 itkGetConstMacro(DefaultInsideValue,
double);
537 itkSetMacro(DefaultOutsideValue,
double);
538 itkGetConstMacro(DefaultOutsideValue,
double);
553 virtual void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
561 itkSetMacro(Dimension,
unsigned int);
562 itkGetConstReferenceMacro(Dimension,
unsigned int)
563 itkSetMacro(TypeName, std::string);
565 itkGetModifiableObjectMacro(InternalInverseTransform,
TransformType);
628 #if !defined( CABLE_CONFIGURATION )
629 #ifndef ITK_MANUAL_INSTANTIATION
630 #include "itkSpatialObject.hxx"
634 #endif // __itkSpatialObject_h
virtual std::string GetSpatialObjectTypeAsString() const
unsigned int GetMaximumDepth() const
void SetChildren(ChildrenListType &children)
Index< VDimension > IndexType
TransformType * GetObjectToNodeTransform(void)
Point< ScalarType, VDimension > PointType
bool Evaluate(const PointType &point) const
Offset< VDimension > OffsetType
virtual void UpdateOutputInformation() ITK_OVERRIDE
virtual void SetRequestedRegion(const RegionType ®ion)
Represents a node in a tree.
const IndexType & GetIndex() const
virtual const double * GetSpacing() const
ImageRegion< VDimension > RegionType
virtual void DerivativeAt(const PointType &point, short unsigned int order, OutputVectorType &value, unsigned int depth=0, char *name=ITK_NULLPTR)
BoundingBox< IdentifierType, VDimension, ScalarType, VectorContainerType > BoundingBoxType
SpatialObjectProperty< float > PropertyType
SpatialObject< VDimension > Self
SmartPointer< const Self > ConstPointer
Represent the size (bounds) of a n-dimensional image.
TransformType * GetModifiableIndexToObjectTransform(void)
signed long OffsetValueType
const TransformType * GetIndexToObjectTransform(void) const
void SetProperty(PropertyType *property)
AffineGeometryFrameType::Pointer AffineGeometryFramePointer
void operator=(const Self &)
unsigned long GetWorldTransformMTime(void)
void ComputeObjectToParentTransform(void)
signed long IndexValueType
unsigned long ModifiedTimeType
double m_DefaultInsideValue
virtual void CopyInformation(const DataObject *data) ITK_OVERRIDE
PropertyType * GetProperty(void)
void SetParent(Self *parent)
unsigned int GetNumberOfChildren(unsigned int depth=0, char *name=ITK_NULLPTR) const
virtual bool ComputeLocalBoundingBox() const
void ComputeOffsetTable()
TransformPointer m_InternalInverseTransform
CovariantVector< double, VDimension > OutputVectorType
virtual const RegionType & GetLargestPossibleRegion() const
void RemoveSpatialObject(Self *object)
SmartPointer< Self > Pointer
TransformType * GetObjectToParentTransform(void)
virtual void SetRequestedRegionToLargestPossibleRegion() ITK_OVERRIDE
VectorContainer< IdentifierType, PointType > VectorContainerType
TransformType * GetIndexToObjectTransform(void)
TransformType * GetNodeToParentNodeTransform(void)
AffineGeometryFramePointer m_AffineGeometryFrame
RegionType m_RequestedRegion
AffineGeometryFrame< double, VDimension > AffineGeometryFrameType
TransformType::Pointer TransformPointer
const TransformType * TransformConstPointer
RegionType m_LargestPossibleRegion
IndexType ComputeIndex(OffsetValueType offset) const
PropertyType::Pointer PropertyPointer
bool SetInternalInverseTransformToWorldToIndexTransform() const
unsigned int m_BoundingBoxChildrenDepth
TransformPointer m_ObjectToParentTransform
OutputVectorType * OutputVectorPointer
virtual void SetBufferedRegion(const RegionType ®ion)
virtual bool IsEvaluableAt(const PointType &point, unsigned int depth=0, char *name=ITK_NULLPTR) const
const OffsetValueType * GetOffsetTable() const
VectorType * VectorPointer
virtual BoundingBoxType * GetBoundingBox() const
ModifiedTimeType m_BoundsMTime
void SetNodeToParentNodeTransform(TransformType *transform)
A templated class holding a n-Dimensional vector.
OffsetValueType m_OffsetTable[3+1]
static const unsigned int ObjectDimension
virtual bool IsInside(const PointType &point, unsigned int depth=0, char *name=ITK_NULLPTR) const
ChildrenListType m_InternalChildrenList
Size< VDimension > SizeType
std::string m_BoundingBoxChildrenName
virtual void Update(void) ITK_OVERRIDE
virtual void SetLargestPossibleRegion(const RegionType ®ion)
Implementation of the composite pattern.
SpatialObjectTreeNode< VDimension > TreeNodeType
PropertyPointer m_Property
virtual ModifiedTimeType GetMTime(void) const ITK_OVERRIDE
void AddSpatialObject(Self *pointer)
void ComputeObjectToWorldTransform(void)
std::list< Pointer > ChildrenListType
Vector< ScalarType, VDimension > VectorType
virtual ModifiedTimeType GetMTime() const
virtual bool HasParent(void) const
BoundingBoxPointer m_Bounds
RegionType m_BufferedRegion
virtual void Modified() const
void SetObjectToWorldTransform(TransformType *transform)
void SetSpacing(const double spacing[itkGetStaticConstMacro(ObjectDimension)])
virtual bool ValueAt(const PointType &point, double &value, unsigned int depth=0, char *name=ITK_NULLPTR) const
virtual bool VerifyRequestedRegion() ITK_OVERRIDE
unsigned long GetTransformMTime(void)
virtual const RegionType & GetRequestedRegion() const
virtual ChildrenListType * GetChildren(unsigned int depth=0, char *name=ITK_NULLPTR) const
unsigned long GetObjectMTime(void) const
ChildrenListType * ChildrenListPointer
CovariantVector< ScalarType, VDimension > CovariantVectorType
virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
virtual bool ComputeBoundingBox() const
virtual const RegionType & GetBufferedRegion() const
virtual const char * GetTypeName(void) const
Point< ScalarType, VDimension > InputType
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
Control indentation during Print() invocation.
static const unsigned int MaximumDepth
ScalableAffineTransform< double, VDimension > TransformType
TreeNodeType::Pointer m_TreeNode
unsigned int GetObjectDimension(void) const
double m_DefaultOutsideValue
OffsetValueType ComputeOffset(const IndexType &ind) const
Describes the geometry of a data object.
TransformPointer m_ObjectToWorldTransform
virtual const Self * GetParent(void) const
virtual bool RequestedRegionIsOutsideOfTheBufferedRegion() ITK_OVERRIDE
A templated class holding a geometric point in n-Dimensional space.
A templated class holding a n-Dimensional covariant vector.
Base class for all data objects in ITK.
BoundingBoxType::Pointer BoundingBoxPointer
void SetObjectToParentTransform(TransformType *transform)
Represent and compute information about bounding boxes.
TransformPointer m_IndexToWorldTransform