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();
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
Point< ScalarType, VDimension > PointType
bool Evaluate(const PointType &point) const
Offset< VDimension > OffsetType
virtual void SetRequestedRegion(const RegionType ®ion)
Represents a node in a tree.
const IndexType & GetIndex() const
virtual const double * GetSpacing() const
ImageRegion< VDimension > RegionType
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
void SetProperty(PropertyType *property)
AffineGeometryFrameType::Pointer AffineGeometryFramePointer
TransformType * GetNodeToParentNodeTransform()
void operator=(const Self &)
virtual void SetRequestedRegionToLargestPossibleRegion() override
signed long IndexValueType
unsigned long ModifiedTimeType
double m_DefaultInsideValue
unsigned long GetWorldTransformMTime()
void SetParent(Self *parent)
virtual bool ComputeLocalBoundingBox() const
void ComputeOffsetTable()
virtual bool HasParent() const
TransformPointer m_InternalInverseTransform
CovariantVector< double, VDimension > OutputVectorType
virtual const RegionType & GetLargestPossibleRegion() const
virtual void PrintSelf(std::ostream &os, Indent indent) const override
void RemoveSpatialObject(Self *object)
SmartPointer< Self > Pointer
unsigned int GetNumberOfChildren(unsigned int depth=0, char *name=nullptr) const
VectorContainer< IdentifierType, PointType > VectorContainerType
TransformType * GetIndexToObjectTransform(void)
AffineGeometryFramePointer m_AffineGeometryFrame
RegionType m_RequestedRegion
AffineGeometryFrame< double, VDimension > AffineGeometryFrameType
TransformType::Pointer TransformPointer
const TransformType * TransformConstPointer
virtual bool ValueAt(const PointType &point, double &value, unsigned int depth=0, char *name=nullptr) const
RegionType m_LargestPossibleRegion
IndexType ComputeIndex(OffsetValueType offset) const
PropertyType::Pointer PropertyPointer
bool SetInternalInverseTransformToWorldToIndexTransform() const
unsigned int m_BoundingBoxChildrenDepth
virtual void UpdateOutputInformation() override
TransformPointer m_ObjectToParentTransform
OutputVectorType * OutputVectorPointer
virtual void SetBufferedRegion(const RegionType ®ion)
void ComputeObjectToWorldTransform()
const OffsetValueType * GetOffsetTable() const
TransformType * GetObjectToNodeTransform()
VectorType * VectorPointer
PropertyType * GetProperty()
virtual BoundingBoxType * GetBoundingBox() const
virtual bool IsInside(const PointType &point, unsigned int depth=0, char *name=nullptr) 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
ChildrenListType m_InternalChildrenList
Size< VDimension > SizeType
const TransformType * GetIndexToObjectTransform() const
std::string m_BoundingBoxChildrenName
virtual void Update(void) override
virtual void SetLargestPossibleRegion(const RegionType ®ion)
Implementation of the composite pattern.
SpatialObjectTreeNode< VDimension > TreeNodeType
PropertyPointer m_Property
void AddSpatialObject(Self *pointer)
virtual ChildrenListType * GetChildren(unsigned int depth=0, char *name=nullptr) const
std::list< Pointer > ChildrenListType
Vector< ScalarType, VDimension > VectorType
virtual ModifiedTimeType GetMTime() const
void ComputeObjectToParentTransform()
BoundingBoxPointer m_Bounds
RegionType m_BufferedRegion
virtual void Modified() const
void SetObjectToWorldTransform(TransformType *transform)
void SetSpacing(const double spacing[itkGetStaticConstMacro(ObjectDimension)])
virtual void DerivativeAt(const PointType &point, short unsigned int order, OutputVectorType &value, unsigned int depth=0, char *name=nullptr)
virtual const RegionType & GetRequestedRegion() const
virtual const Self * GetParent() const
virtual bool IsEvaluableAt(const PointType &point, unsigned int depth=0, char *name=nullptr) const
TransformType * GetObjectToParentTransform()
unsigned long GetObjectMTime(void) const
ChildrenListType * ChildrenListPointer
CovariantVector< ScalarType, VDimension > CovariantVectorType
virtual bool ComputeBoundingBox() const
virtual const RegionType & GetBufferedRegion() const
virtual const char * GetTypeName(void) const
virtual void CopyInformation(const DataObject *data) override
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
virtual ModifiedTimeType GetMTime(void) const override
Describes the geometry of a data object.
TransformPointer m_ObjectToWorldTransform
A templated class holding a geometric point in n-Dimensional space.
A templated class holding a n-Dimensional covariant vector.
virtual bool RequestedRegionIsOutsideOfTheBufferedRegion() override
virtual bool VerifyRequestedRegion() override
unsigned long GetTransformMTime()
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