ITK  6.0.0
Insight Toolkit
itkFastMarchingImageToNodePairContainerAdaptor.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
19#ifndef itkFastMarchingImageToNodePairContainerAdaptor_h
20#define itkFastMarchingImageToNodePairContainerAdaptor_h
21
22#include "itkObject.h"
24
25namespace itk
26{
49template <typename TInput, typename TOutput, typename TImage>
50class ITK_TEMPLATE_EXPORT FastMarchingImageToNodePairContainerAdaptor : public Object
51{
52public:
53 ITK_DISALLOW_COPY_AND_MOVE(FastMarchingImageToNodePairContainerAdaptor);
54
59
60
62 itkNewMacro(Self);
63
65 itkOverrideGetNameOfClassMacro(FastMarchingImageToNodePairContainerAdaptor);
66
68 using NodePairType = typename Traits::NodePairType;
69 using NodePairContainerType = typename Traits::NodePairContainerType;
70 using NodePairContainerPointer = typename Traits::NodePairContainerPointer;
71 using LabelType = typename Traits::LabelType;
72 using OutputPixelType = typename Traits::OutputPixelType;
73
74 using ImageType = TImage;
77 using ImagePixelType = typename ImageType::PixelType;
78
79 static constexpr unsigned int ImageDimension = Traits::ImageDimension;
80
84 void
85 SetAliveImage(const ImageType * iImage);
86 itkGetConstObjectMacro(AliveImage, ImageType);
87
91 void
92 SetTrialImage(const ImageType * iImage);
93 itkGetConstObjectMacro(TrialImage, ImageType);
94
105 void
107 itkGetConstObjectMacro(ForbiddenImage, ImageType);
108
109 itkSetMacro(IsForbiddenImageBinaryMask, bool);
110 itkGetConstMacro(IsForbiddenImageBinaryMask, bool);
111 itkBooleanMacro(IsForbiddenImageBinaryMask);
112
116
120
124
125 itkSetMacro(AliveValue, OutputPixelType);
126 itkGetConstMacro(AliveValue, OutputPixelType);
127
128 itkSetMacro(TrialValue, OutputPixelType);
129 itkGetConstMacro(TrialValue, OutputPixelType);
130
132 void
134
135protected:
138
141
142 ImageConstPointer m_AliveImage{};
143 ImageConstPointer m_TrialImage{};
144 ImageConstPointer m_ForbiddenImage{};
145
148 NodePairContainerPointer m_ForbiddenPoints{};
149
150 OutputPixelType m_AliveValue{};
151 OutputPixelType m_TrialValue{};
152
153 bool m_IsForbiddenImageBinaryMask{ false };
154
155 virtual void
157
159 void
160 SetPointsFromImage(const ImageType * image, const LabelType & iLabel, const OutputPixelType & iValue);
161};
162} // namespace itk
163
164#ifndef ITK_MANUAL_INSTANTIATION
165# include "itkFastMarchingImageToNodePairContainerAdaptor.hxx"
166#endif
167
168#endif // itkFastMarchingImageToNodePairContainerAdaptor_h
Convenient adaptor class which converts Image into FastMarching::NodePairContainerType used for initi...
NodePairContainerType * GetTrialPoints()
Get resulting Trial Points container.
NodePairContainerType * GetForbiddenPoints()
Get resulting Forbidden Points container.
void SetTrialImage(const ImageType *iImage)
Set one Trial Image.
void SetAliveImage(const ImageType *iImage)
Set one Alive Image.
~FastMarchingImageToNodePairContainerAdaptor() override=default
Destructor.
NodePairContainerType * GetAlivePoints()
Get resulting Alive Points container.
void SetPointsFromImage(const ImageType *image, const LabelType &iLabel, const OutputPixelType &iValue)
void SetForbiddenImage(const ImageType *iImage)
Set one Forbidden Image. There are two possible behaviors here depending on m_IsForbiddenImageBinaryM...
Base class traits to be used by the FastMarchingBase.
Light weight base class for most itk classes.
Base class for most ITK classes.
Definition: itkObject.h:62
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....