ITK  5.2.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  * 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 
19 #ifndef itkFastMarchingImageToNodePairContainerAdaptor_h
20 #define itkFastMarchingImageToNodePairContainerAdaptor_h
21 
22 #include "itkObject.h"
23 #include "itkFastMarchingTraits.h"
24 
25 namespace itk
26 {
49 template <typename TInput, typename TOutput, typename TImage>
50 class ITK_TEMPLATE_EXPORT FastMarchingImageToNodePairContainerAdaptor : public Object
51 {
52 public:
53  ITK_DISALLOW_COPY_AND_MOVE(FastMarchingImageToNodePairContainerAdaptor);
54 
59 
60 
62  itkNewMacro(Self);
63 
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;
75  using ImagePointer = typename ImageType::Pointer;
76  using ImageConstPointer = typename ImageType::ConstPointer;
77  using ImagePixelType = typename ImageType::PixelType;
78 
79  static constexpr unsigned int ImageDimension = Traits::ImageDimension;
80 
84  void
85  SetAliveImage(const ImageType * iImage);
86 
90  void
91  SetTrialImage(const ImageType * iImage);
92 
103  void
104  SetForbiddenImage(const ImageType * iImage);
105 
106  itkSetMacro(IsForbiddenImageBinaryMask, bool);
107  itkBooleanMacro(IsForbiddenImageBinaryMask);
108 
111  GetAlivePoints();
112 
115  GetTrialPoints();
116 
119  GetForbiddenPoints();
120 
121  itkSetMacro(AliveValue, OutputPixelType);
122  itkSetMacro(TrialValue, OutputPixelType);
123 
125  void
126  Update();
127 
128 protected:
131 
133  ~FastMarchingImageToNodePairContainerAdaptor() override = default;
134 
138 
142 
145 
146  bool m_IsForbiddenImageBinaryMask{ false };
147 
148  virtual void
149  GenerateData();
150 
152  void
153  SetPointsFromImage(const ImageType * image, const LabelType & iLabel, const OutputPixelType & iValue);
154 };
155 } // namespace itk
156 
157 #ifndef ITK_MANUAL_INSTANTIATION
158 # include "itkFastMarchingImageToNodePairContainerAdaptor.hxx"
159 #endif
160 
161 #endif // itkFastMarchingImageToNodePairContainerAdaptor_h
itk::FastMarchingImageToNodePairContainerAdaptor::ImageConstPointer
typename ImageType::ConstPointer ImageConstPointer
Definition: itkFastMarchingImageToNodePairContainerAdaptor.h:76
itk::FastMarchingImageToNodePairContainerAdaptor::OutputPixelType
typename Traits::OutputPixelType OutputPixelType
Definition: itkFastMarchingImageToNodePairContainerAdaptor.h:72
itk::FastMarchingImageToNodePairContainerAdaptor::NodePairContainerPointer
typename Traits::NodePairContainerPointer NodePairContainerPointer
Definition: itkFastMarchingImageToNodePairContainerAdaptor.h:70
itk::FastMarchingImageToNodePairContainerAdaptor::NodePairType
typename Traits::NodePairType NodePairType
Definition: itkFastMarchingImageToNodePairContainerAdaptor.h:68
itk::FastMarchingImageToNodePairContainerAdaptor
Convenient adaptor class which converts Image into FastMarching::NodePairContainerType used for initi...
Definition: itkFastMarchingImageToNodePairContainerAdaptor.h:50
itk::SmartPointer< Self >
itkFastMarchingTraits.h
itk::FastMarchingImageToNodePairContainerAdaptor::ImageType
TImage ImageType
Definition: itkFastMarchingImageToNodePairContainerAdaptor.h:74
itk::FastMarchingImageToNodePairContainerAdaptor::m_ForbiddenPoints
NodePairContainerPointer m_ForbiddenPoints
Definition: itkFastMarchingImageToNodePairContainerAdaptor.h:141
itk::FastMarchingImageToNodePairContainerAdaptor::LabelType
typename Traits::LabelType LabelType
Definition: itkFastMarchingImageToNodePairContainerAdaptor.h:71
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::FastMarchingImageToNodePairContainerAdaptor::m_AlivePoints
NodePairContainerPointer m_AlivePoints
Definition: itkFastMarchingImageToNodePairContainerAdaptor.h:139
itk::FastMarchingImageToNodePairContainerAdaptor::m_AliveValue
OutputPixelType m_AliveValue
Definition: itkFastMarchingImageToNodePairContainerAdaptor.h:143
itk::FastMarchingTraits
Base class traits to be used by the FastMarchingBase.
Definition: itkFastMarchingTraits.h:110
itk::FastMarchingImageToNodePairContainerAdaptor::ImagePixelType
typename ImageType::PixelType ImagePixelType
Definition: itkFastMarchingImageToNodePairContainerAdaptor.h:77
itk::FastMarchingImageToNodePairContainerAdaptor::m_TrialValue
OutputPixelType m_TrialValue
Definition: itkFastMarchingImageToNodePairContainerAdaptor.h:144
itk::FastMarchingImageToNodePairContainerAdaptor::ImagePointer
typename ImageType::Pointer ImagePointer
Definition: itkFastMarchingImageToNodePairContainerAdaptor.h:75
itk::FastMarchingImageToNodePairContainerAdaptor::m_AliveImage
ImageConstPointer m_AliveImage
Definition: itkFastMarchingImageToNodePairContainerAdaptor.h:135
itkObject.h
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:62
itk::FastMarchingImageToNodePairContainerAdaptor::m_TrialPoints
NodePairContainerPointer m_TrialPoints
Definition: itkFastMarchingImageToNodePairContainerAdaptor.h:140
itk::FastMarchingImageToNodePairContainerAdaptor::m_ForbiddenImage
ImageConstPointer m_ForbiddenImage
Definition: itkFastMarchingImageToNodePairContainerAdaptor.h:137
itk::FastMarchingImageToNodePairContainerAdaptor::NodePairContainerType
typename Traits::NodePairContainerType NodePairContainerType
Definition: itkFastMarchingImageToNodePairContainerAdaptor.h:69
itk::FastMarchingImageToNodePairContainerAdaptor::m_TrialImage
ImageConstPointer m_TrialImage
Definition: itkFastMarchingImageToNodePairContainerAdaptor.h:136