ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkPlaneSpatialObject.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 itkPlaneSpatialObject_h
19 #define itkPlaneSpatialObject_h
20 
21 #include "itkSpatialObject.h"
22 #include "itkAffineTransform.h"
23 
24 namespace itk
25 {
36 template< unsigned int TDimension = 3 >
38  public SpatialObject< TDimension >
39 {
40 public:
41 
44  typedef double ScalarType;
49  typedef typename Superclass::PointType PointType;
54 
55  itkStaticConstMacro(NumberOfDimension, unsigned int,
56  TDimension);
57 
58  itkNewMacro(Self);
59  itkTypeMacro(PlaneSpatialObject, SpatialObject);
60 
63  virtual bool ValueAt(const PointType & point, double & value,
64  unsigned int depth = 0, char *name = ITK_NULLPTR) const ITK_OVERRIDE;
65 
68  virtual bool IsEvaluableAt(const PointType & point,
69  unsigned int depth = 0, char *name = ITK_NULLPTR) const ITK_OVERRIDE;
70 
72  virtual bool IsInside(const PointType & point,
73  unsigned int depth, char *name) const ITK_OVERRIDE;
74 
78  virtual bool IsInside(const PointType & point) const;
79 
83  virtual bool ComputeLocalBoundingBox() const ITK_OVERRIDE;
84 
85  itkSetMacro(LowerPoint, PointType);
86  itkSetMacro(UpperPoint, PointType);
87  itkGetMacro(LowerPoint, PointType);
88  itkGetMacro(UpperPoint, PointType);
89 
90 protected:
91  PlaneSpatialObject(const Self &); //purposely not implemented
92  void operator=(const Self &); //purposely not implemented
93 
96 
97  PointType m_LowerPoint;
98  PointType m_UpperPoint;
99 
101  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
102 };
103 } // end namespace itk
104 
105 #ifndef ITK_MANUAL_INSTANTIATION
106 #include "itkPlaneSpatialObject.hxx"
107 #endif
108 
109 #endif // itkPlaneSpatialObject_h
Point< ScalarType, VDimension > PointType
SmartPointer< const Self > ConstPointer
BoundingBox< IdentifierType, VDimension, ScalarType, VectorContainerType > BoundingBoxType
virtual bool ValueAt(const PointType &point, double &value, unsigned int depth=0, char *name=nullptr) const override
static const unsigned int NumberOfDimension
SmartPointer< PointContainerType > PointContainerPointer
virtual bool IsEvaluableAt(const PointType &point, unsigned int depth=0, char *name=nullptr) const override
virtual bool ComputeLocalBoundingBox() const override
Superclass::PointType PointType
Superclass::TransformType TransformType
Implementation of the composite pattern.
Superclass::BoundingBoxType BoundingBoxType
VectorContainer< IdentifierType, PointType > PointContainerType
SpatialObject< TDimension > Superclass
virtual bool IsInside(const PointType &point, unsigned int depth, char *name) const override
Define a front-end to the STL &quot;vector&quot; container that conforms to the IndexedContainerInterface.
SmartPointer< Self > Pointer
Control indentation during Print() invocation.
Definition: itkIndent.h:49
ScalableAffineTransform< double, VDimension > TransformType
SmartPointer< Superclass > SuperclassPointer
virtual void PrintSelf(std::ostream &os, Indent indent) const override
Base class for all data objects in ITK.