18#ifndef itkSpatialObject_h
19#define itkSpatialObject_h
57template <
unsigned int VDimension = 3>
69 static constexpr unsigned int MaximumDepth = std::numeric_limits<unsigned int>::max();
142 itkGetConstReferenceMacro(Id,
int);
148 itkSetMacro(TypeName, std::string);
279 unsigned int depth = 0,
280 const std::string & name =
"")
const;
304 unsigned int depth = 0,
305 const std::string & name =
"")
const;
310 unsigned int depth = 0,
311 const std::string & name =
"")
const;
321 itkSetMacro(DefaultInsideValue,
double);
322 itkGetConstMacro(DefaultInsideValue,
double);
327 itkSetMacro(DefaultOutsideValue,
double);
328 itkGetConstMacro(DefaultOutsideValue,
double);
337#ifndef ITK_FUTURE_LEGACY_REMOVE
343 unsigned int depth = 0,
344 const std::string & name =
"")
const;
352#ifndef ITK_FUTURE_LEGACY_REMOVE
369#ifndef ITK_FUTURE_LEGACY_REMOVE
379 short unsigned int order,
381 unsigned int depth = 0,
382 const std::string & name =
"",
391#ifndef ITK_FUTURE_LEGACY_REMOVE
396 short unsigned int order,
398 unsigned int depth = 0,
399 const std::string & name =
"",
434 itkSetMacro(ParentId,
int);
435 itkGetConstReferenceMacro(ParentId,
int);
467 GetChildren(
unsigned int depth = 0,
const std::string & name =
"")
const;
482 unsigned int depth = 0,
483 const std::string & name =
"")
const;
685#if !defined(ITK_LEGACY_REMOVE)
686 itkLegacyMacro(
void ComputeObjectToWorldTransform())
691 itkLegacyMacro(
void ComputeBoundingBox())
697 itkLegacyMacro(
virtual bool IsInside(
const PointType & point,
unsigned int depth = 0,
const std::string & name =
"")
700 return IsInsideInObjectSpace(point, depth, name);
775#if !defined(ITK_WRAPPING_PARSER)
776# ifndef ITK_MANUAL_INSTANTIATION
777# include "itkSpatialObject.hxx"
Represent and compute information about bounding boxes.
SmartPointer< Self > Pointer
A templated class holding a n-Dimensional covariant vector.
AffineTransform< ScalarType, VDimension > TransformType
An image region represents a structured region of data.
Control indentation during Print() invocation.
SmartPointer< Self > Pointer
virtual ModifiedTimeType GetMTime() const
virtual void Modified() const
A templated class holding a geometric point in n-Dimensional space.
Implements transparent reference counting.
Size< VDimension > SizeType
typename TransformType::Pointer TransformPointer
void SetObjectToParentTransform(const TransformType *transform)
virtual const BoundingBoxType * GetFamilyBoundingBoxInWorldSpace() const
const BoundingBoxPointer m_MyBoundingBoxInWorldSpace
virtual void ComputeMyBoundingBox()
std::list< ConstPointer > ChildrenConstListType
virtual Self * GetParent()
void SetProperty(const PropertyType &property)
const BoundingBoxPointer m_FamilyBoundingBoxInWorldSpace
virtual ChildrenListType * GetChildren(unsigned int depth=0, const std::string &name="") const
VectorType * VectorPointer
virtual ChildrenConstListType * GetConstChildren(unsigned int depth=0, const std::string &name="") const
RegionType m_BufferedRegion
virtual bool IsInsideChildrenInObjectSpace(const PointType &point, unsigned int depth=0, const std::string &name="") const
virtual void AddChildrenToList(ChildrenListType *childrenList, unsigned int depth=0, const std::string &name="") const
BoundingBox< IdentifierType, VDimension, ScalarType, VectorContainerType > BoundingBoxType
void UpdateOutputInformation() override
virtual std::string GetTypeName() const
ChildrenListType * ChildrenListPointer
bool VerifyRequestedRegion() override
virtual const BoundingBoxType * GetMyBoundingBoxInWorldSpace() const
virtual void DerivativeAtInObjectSpace(const PointType &point, short unsigned int order, CovariantVectorType &value, unsigned int depth=0, const std::string &name="", const DerivativeOffsetType &offset=MakeFilled< DerivativeOffsetType >(1))
virtual std::string GetClassNameAndDimension() const
virtual bool IsInsideInObjectSpace(const PointType &point) const
const PropertyType & GetProperty() const
virtual void SetLargestPossibleRegion(const RegionType ®ion)
virtual bool IsEvaluableAtChildrenInObjectSpace(const PointType &point, unsigned int depth=0, const std::string &name="") const
SmartPointer< const Self > ConstPointer
virtual const Self * GetParent() const
int GetNextAvailableId() const
void SetRequestedRegionToLargestPossibleRegion() override
void SetRequestedRegion(const DataObject *data) override
void SetParent(Self *parent)
bool ValueAtInWorldSpace(const PointType &point, double &value, unsigned int depth=0, const std::string &name="") const
const BoundingBoxPointer m_FamilyBoundingBoxInObjectSpace
virtual const RegionType & GetRequestedRegion() const
virtual void AddChildrenToConstList(ChildrenConstListType *childrenCList, unsigned int depth=0, const std::string &name="") const
SmartPointer< Self > Pointer
const TransformPointer m_ObjectToWorldTransformInverse
virtual void SetRequestedRegion(const RegionType ®ion)
bool RequestedRegionIsOutsideOfTheBufferedRegion() override
void PrintSelf(std::ostream &os, Indent indent) const override
bool RemoveChild(Self *pointer)
bool IsInsideInWorldSpace(const PointType &point, unsigned int depth, const std::string &name="") const
void DerivativeAtInWorldSpace(const PointType &point, short unsigned int order, CovariantVectorType &value, unsigned int depth=0, const std::string &name="", const DerivativeOffsetType &offset=MakeFilled< DerivativeOffsetType >(1))
unsigned int GetMaximumDepth() const
virtual bool ComputeFamilyBoundingBox(unsigned int depth=0, const std::string &name="") const
static constexpr ObjectDimensionType ObjectDimension
SpatialObjectProperty PropertyType
ModifiedTimeType GetMTime() const override
double m_DefaultOutsideValue
const TransformPointer m_ObjectToParentTransform
void ProtectedComputeObjectToWorldTransform()
const TransformPointer m_ObjectToWorldTransform
virtual const RegionType & GetLargestPossibleRegion() const
virtual bool ValueAtInObjectSpace(const PointType &point, double &value, unsigned int depth=0, const std::string &name="") const
const TransformPointer m_ObjectToParentTransformInverse
static constexpr unsigned int MaximumDepth
unsigned int ObjectDimensionType
bool IsInsideInObjectSpace(const PointType &point, unsigned int depth, const std::string &name="") const
double m_DefaultInsideValue
LightObject::Pointer InternalClone() const override
DerivativeVectorType * DerivativeVectorPointer
std::list< Pointer > ObjectListType
bool IsEvaluableAtInWorldSpace(const PointType &point, unsigned int depth=0, const std::string &name="") const
unsigned int GetObjectDimension() const
void SetChildren(ChildrenListType &children)
RegionType m_RequestedRegion
SpatialObject< VDimension > * GetObjectById(int id)
ChildrenConstListType * ChildrenConstListPointer
bool FixParentChildHierarchyUsingParentIds()
SpatialObject< VDimension > Self
Vector< ScalarType, VDimension > VectorType
unsigned int GetNumberOfChildren(unsigned int depth=0, const std::string &name="") const
void AddChild(Self *pointer)
const TransformType * GetObjectToWorldTransformInverse() const
Point< ScalarType, VDimension > PointType
ImageRegion< VDimension > RegionType
RegionType m_LargestPossibleRegion
virtual bool ValueAtChildrenInObjectSpace(const PointType &point, double &value, unsigned int depth=0, const std::string &name="") const
ChildrenListType m_ChildrenList
void RemoveAllChildren(unsigned int depth=MaximumDepth)
~SpatialObject() override
ModifiedTimeType GetMyMTime() const
VectorContainer< PointType > VectorContainerType
const TransformType * GetObjectToParentTransformInverse() const
Point< ScalarType, VDimension > InputType
const BoundingBoxPointer m_MyBoundingBoxInObjectSpace
virtual bool HasParent() const
Index< VDimension > IndexType
virtual void SetBufferedRegion(const RegionType ®ion)
AffineTransform< ScalarType, VDimension > TransformType
bool Evaluate(const PointType &point) const
CovariantVector< ScalarType, VDimension > CovariantVectorType
void SetObjectToWorldTransform(const TransformType *transform)
void ComputeObjectToParentTransform()
Vector< double, VDimension > DerivativeOffsetType
typename BoundingBoxType::Pointer BoundingBoxPointer
const TransformType * TransformConstPointer
virtual bool IsEvaluableAtInObjectSpace(const PointType &point, unsigned int depth=0, const std::string &name="") const
PropertyType & GetProperty()
BoundingBoxType * GetModifiableMyBoundingBoxInObjectSpace()
std::list< ConstPointer > ObjectConstListType
std::list< Pointer > ChildrenListType
bool CheckIdValidity() const
bool IsInsideInWorldSpace(const PointType &point) const
CovariantVector< ScalarType, VDimension > DerivativeVectorType
virtual const RegionType & GetBufferedRegion() const
void CopyInformation(const DataObject *data) override
A templated class holding a n-Dimensional vector.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
constexpr TContainer MakeFilled(typename TContainer::const_reference value)
*par Constraints *The filter image with at least two dimensions and a vector *length of at least The theory supports extension to scalar but *the implementation of the itk vector classes do not **The template parameter TRealType must be floating point(float or double) or *a user-defined "real" numerical type with arithmetic operations defined *sufficient to compute derivatives. **\par Performance *This filter will automatically multithread if run with *SetUsePrincipleComponents
detail::VectorContainer< std::conditional_t< std::is_void_v< T2 >, SizeValueType, T1 >, std::conditional_t< std::is_void_v< T2 >, T1, T2 > > VectorContainer
SizeValueType ModifiedTimeType
Represent a n-dimensional index in a n-dimensional image.
Represent a n-dimensional size (bounds) of a n-dimensional image.