ITK  6.0.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 "itkNumericTraits.h"
24
25namespace itk
26{
46template <unsigned int TDimension = 3, typename TPixel = unsigned char>
47class ITK_TEMPLATE_EXPORT ImageMaskSpatialObject : public ImageSpatialObject<TDimension, TPixel>
48{
49public:
50 ITK_DISALLOW_COPY_AND_MOVE(ImageMaskSpatialObject);
51
56
57 using typename Superclass::ScalarType;
58 using typename Superclass::PixelType;
59 using typename Superclass::ImageType;
60 using typename Superclass::ImagePointer;
61 using typename Superclass::IndexType;
62 using typename Superclass::RegionType;
63 using typename Superclass::SizeType;
64 using typename Superclass::TransformType;
65 using typename Superclass::PointType;
66 using typename Superclass::BoundingBoxType;
67 using typename Superclass::InterpolatorType;
68
70
72 itkNewMacro(Self);
73
75 itkOverrideGetNameOfClassMacro(ImageMaskSpatialObject);
76
85 bool
86 IsInsideInObjectSpace(const PointType & point) const override;
87
92 itkSetMacro(MaskValue, PixelType);
93 itkGetConstReferenceMacro(MaskValue, PixelType);
96 itkBooleanMacro(UseMaskValue);
97 itkSetMacro(UseMaskValue, bool);
98 itkGetConstReferenceMacro(UseMaskValue, bool);
99
100 /* Avoid hiding the overload that supports depth and name arguments */
101 using Superclass::IsInsideInObjectSpace;
102
115
116#if !defined(ITK_LEGACY_REMOVE)
120 itkLegacyMacro(RegionType GetAxisAlignedBoundingBoxRegion() const;)
121
122#endif
123
124protected:
128 void
130
132 ~ImageMaskSpatialObject() override = default;
133
134 typename LightObject::Pointer
135 InternalClone() const override;
136
137private:
138 bool m_UseMaskValue{ false };
140};
141} // end of namespace itk
142
143#ifndef ITK_MANUAL_INSTANTIATION
144# include "itkImageMaskSpatialObject.hxx"
145#endif
146
147#endif // itkImageMaskSpatialObject_h
Base class for all data objects in ITK.
Implementation of an image mask as spatial object.
~ImageMaskSpatialObject() override=default
LightObject::Pointer InternalClone() const override
bool IsInsideInObjectSpace(const PointType &point) const override
void ComputeMyBoundingBox() override
RegionType ComputeMyBoundingBoxInIndexSpace() const
Multi-dimensional image iterator which only walks a region.
Implementation of an image as spatial object.
Base class for most ITK classes.
Definition: itkObject.h:62
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:54
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
*par Constraints *The filter 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