ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkEllipseSpatialObject.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 itkEllipseSpatialObject_h
19 #define itkEllipseSpatialObject_h
20 
21 #include "itkSpatialObject.h"
22 #include "itkAffineTransform.h"
23 #include "itkFixedArray.h"
24 
25 namespace itk
26 {
36 template< unsigned int TDimension = 3 >
37 class ITK_TEMPLATE_EXPORT EllipseSpatialObject:
38  public SpatialObject< TDimension >
39 {
40 public:
41  ITK_DISALLOW_COPY_AND_ASSIGN(EllipseSpatialObject);
42 
44  using ScalarType = double;
49  using PointType = typename Superclass::PointType;
50  using TransformType = typename Superclass::TransformType;
51  using BoundingBoxType = typename Superclass::BoundingBoxType;
54 
56 
57  static constexpr unsigned int ObjectDimension = TDimension;
58 
60  itkNewMacro(Self);
61 
63  itkTypeMacro(EllipseSpatialObject, SpatialObject);
64 
67  void SetRadiusInObjectSpace(double radius);
68 
70  itkSetMacro(RadiusInObjectSpace, ArrayType);
71 
73  itkGetConstReferenceMacro(RadiusInObjectSpace, ArrayType);
74 
76  itkSetMacro( CenterInObjectSpace, PointType );
77 
79  itkGetConstReferenceMacro(CenterInObjectSpace, PointType);
80 
82  bool IsInsideInObjectSpace(const PointType & point, unsigned int depth=0,
83  const std::string & name="" ) const override;
84 
88  bool ComputeMyBoundingBox() const override;
89 
90 protected:
92  ~EllipseSpatialObject() override = default;
93 
95  void PrintSelf(std::ostream & os, Indent indent) const override;
96 
97  typename LightObject::Pointer InternalClone() const override;
98 
99 private:
100 
101  /* object space */
104 };
105 
106 } // end namespace itk
107 
108 #ifndef ITK_MANUAL_INSTANTIATION
109 #include "itkEllipseSpatialObject.hxx"
110 #endif
111 
112 #endif // itkEllipseSpatialObject_h
typename Superclass::TransformType TransformType
typename Superclass::BoundingBoxType BoundingBoxType
Implementation of the composite pattern.
typename 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
Base class for most ITK classes.
Definition: itkObject.h:60
Base class for all data objects in ITK.