ITK  5.4.0
Insight Toolkit
itkImageMaskSpatialObject.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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  * https://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 itkImageMaskSpatialObject_h
19 #define itkImageMaskSpatialObject_h
20 
21 #include "itkImageSpatialObject.h"
23 
24 namespace itk
25 {
44 template <unsigned int TDimension = 3, typename TPixel = unsigned char>
45 class ITK_TEMPLATE_EXPORT ImageMaskSpatialObject : public ImageSpatialObject<TDimension, TPixel>
46 {
47 public:
48  ITK_DISALLOW_COPY_AND_MOVE(ImageMaskSpatialObject);
49 
54 
55  using typename Superclass::ScalarType;
56  using typename Superclass::PixelType;
57  using typename Superclass::ImageType;
58  using typename Superclass::ImagePointer;
59  using typename Superclass::IndexType;
60  using typename Superclass::RegionType;
61  using typename Superclass::SizeType;
62  using typename Superclass::TransformType;
63  using typename Superclass::PointType;
64  using typename Superclass::BoundingBoxType;
65  using typename Superclass::InterpolatorType;
66 
68 
70  itkNewMacro(Self);
71 
73  itkOverrideGetNameOfClassMacro(ImageMaskSpatialObject);
74 
82  bool
83  IsInsideInObjectSpace(const PointType & point) const override;
84 
85  /* Avoid hiding the overload that supports depth and name arguments */
86  using Superclass::IsInsideInObjectSpace;
87 
99  ComputeMyBoundingBoxInIndexSpace() const;
100 
101 #if !defined(ITK_LEGACY_REMOVE)
102 
105  itkLegacyMacro(RegionType GetAxisAlignedBoundingBoxRegion() const);
106 
107 #endif
108 
109 protected:
113  void
114  ComputeMyBoundingBox() override;
115 
117  ~ImageMaskSpatialObject() override = default;
118 
119  typename LightObject::Pointer
120  InternalClone() const override;
121 };
122 } // end of namespace itk
123 
124 #ifndef ITK_MANUAL_INSTANTIATION
125 # include "itkImageMaskSpatialObject.hxx"
126 #endif
127 
128 #endif // itkImageMaskSpatialObject_h
itkImageSpatialObject.h
itk::ImageRegion< VDimension >
itk::GTest::TypedefsAndConstructors::Dimension2::PointType
ImageBaseType::PointType PointType
Definition: itkGTestTypedefsAndConstructors.h:51
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::SmartPointer< Self >
itk::ImageSpatialObject
Implementation of an image as spatial object.
Definition: itkImageSpatialObject.h:40
itk::ImageSliceConstIteratorWithIndex
Multi-dimensional image iterator which only walks a region.
Definition: itkImageSliceConstIteratorWithIndex.h:113
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::point
*par Constraints *The filter requires an 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
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itkImageSliceConstIteratorWithIndex.h
itk::ImageMaskSpatialObject
Implementation of an image mask as spatial object.
Definition: itkImageMaskSpatialObject.h:45
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:61
itk::Point
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:53
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293