ITK  4.6.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;
66 
69  virtual bool IsEvaluableAt(const PointType & point,
70  unsigned int depth = 0,
71  char *name = ITK_NULLPTR) const;
72 
74  virtual bool IsInside(const PointType & point,
75  unsigned int depth,
76  char *) const;
77 
81  virtual bool IsInside(const PointType & point) const;
82 
86  virtual bool ComputeLocalBoundingBox() const;
87 
88 protected:
89  BoxSpatialObject(const Self &); //purposely not implemented
90  void operator=(const Self &); //purposely not implemented
91 
92  BoxSpatialObject(void);
93  ~BoxSpatialObject(void);
94 
96 
98  virtual void PrintSelf(std::ostream & os, Indent indent) const;
99 };
100 } // end namespace itk
101 
102 #ifndef ITK_MANUAL_INSTANTIATION
103 #include "itkBoxSpatialObject.hxx"
104 #endif
105 
106 #endif // __itkBoxSpatialObject_h
virtual bool ComputeLocalBoundingBox() const
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=ITK_NULLPTR) const
virtual bool ValueAt(const PointType &point, double &value, unsigned int depth=0, char *name=ITK_NULLPTR) const
FixedArray< double, TDimension > SizeType
virtual void PrintSelf(std::ostream &os, Indent indent) const
SmartPointer< const Self > ConstPointer
Implementation of the composite pattern.
Superclass::TransformType TransformType
void operator=(const Self &)
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
Base class for all data objects in ITK.
virtual bool IsInside(const PointType &point, unsigned int depth, char *) const
SmartPointer< Superclass > SuperclassPointer