ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkBoxSpatialObject.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkBoxSpatialObject_h
19 #define itkBoxSpatialObject_h
20 
21 #include "itkSpatialObject.h"
22 #include "itkAffineTransform.h"
23 #include "itkFixedArray.h"
24 
25 namespace itk
26 {
35 template< unsigned int TDimension = 3 >
37  public SpatialObject< TDimension >
38 {
39 public:
40 
42  typedef double ScalarType;
47  typedef typename Superclass::PointType PointType;
52 
53  itkNewMacro(Self);
54  itkTypeMacro(BoxSpatialObject, SpatialObject);
55 
57  itkSetMacro(Size, SizeType);
58  itkGetConstReferenceMacro(Size, SizeType);
60 
63  virtual bool ValueAt(const PointType & point, double & value,
64  unsigned int depth = 0,
65  char *name = ITK_NULLPTR) const ITK_OVERRIDE;
66 
69  virtual bool IsEvaluableAt(const PointType & point,
70  unsigned int depth = 0,
71  char *name = ITK_NULLPTR) const ITK_OVERRIDE;
72 
74  virtual bool IsInside(const PointType & point,
75  unsigned int depth,
76  char *) const ITK_OVERRIDE;
77 
81  virtual bool IsInside(const PointType & point) const;
82 
86  virtual bool ComputeLocalBoundingBox() const ITK_OVERRIDE;
87 
88 protected:
89  BoxSpatialObject(const Self &) ITK_DELETE_FUNCTION;
90  void operator=(const Self &) ITK_DELETE_FUNCTION;
91 
94 
96 
98  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
99 };
100 } // end namespace itk
101 
102 #ifndef ITK_MANUAL_INSTANTIATION
103 #include "itkBoxSpatialObject.hxx"
104 #endif
105 
106 #endif // itkBoxSpatialObject_h
Point< ScalarType, VDimension > PointType
VectorContainer< IdentifierType, PointType > PointContainerType
The class may be used to represent N-dimensional boxes. In two dimensions it is a rectangle...
BoundingBox< IdentifierType, VDimension, ScalarType, VectorContainerType > BoundingBoxType
Represent the size (bounds) of a n-dimensional image.
Definition: itkSize.h:52
virtual bool IsEvaluableAt(const PointType &point, unsigned int depth=0, char *name=nullptr) const override
virtual void PrintSelf(std::ostream &os, Indent indent) const override
FixedArray< double, TDimension > SizeType
virtual bool ComputeLocalBoundingBox() const override
SmartPointer< const Self > ConstPointer
Implementation of the composite pattern.
virtual bool IsInside(const PointType &point, unsigned int depth, char *) const override
Superclass::TransformType TransformType
Superclass::BoundingBoxType BoundingBoxType
SpatialObject< TDimension > Superclass
SmartPointer< Self > Pointer
Superclass::PointType PointType
Define a front-end to the STL &quot;vector&quot; container that conforms to the IndexedContainerInterface.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
ScalableAffineTransform< double, VDimension > TransformType
virtual bool ValueAt(const PointType &point, double &value, unsigned int depth=0, char *name=nullptr) const override
Base class for all data objects in ITK.
SmartPointer< Superclass > SuperclassPointer