ITK  6.0.0
Insight Toolkit
itkCollidingFrontsImageFilter.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 itkCollidingFrontsImageFilter_h
19 #define itkCollidingFrontsImageFilter_h
20 
22 #include "itkImageToImageFilter.h"
23 
24 namespace itk
25 {
60 template <typename TInputImage, typename TOutputImage>
61 class ITK_TEMPLATE_EXPORT CollidingFrontsImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
62 {
63 public:
64  ITK_DISALLOW_COPY_AND_MOVE(CollidingFrontsImageFilter);
65 
71 
73  itkNewMacro(Self);
74 
76  itkOverrideGetNameOfClassMacro(CollidingFrontsImageFilter);
77 
80  using OutputPixelType = typename TOutputImage::PixelType;
81  using InputPixelType = typename TInputImage::PixelType;
83 
86  static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
87 
89  using InputImageType = TInputImage;
90  using SpeedImageType = TInputImage;
92  using OutputImageType = TOutputImage;
93  using LevelSetImageType = TOutputImage;
95 
97  using typename Superclass::OutputImageRegionType;
98 
102 
110 
113  void
115  {
116  m_SeedPoints1 = points;
117  this->Modified();
118  }
122  NodeContainerPointer
124  {
125  return m_SeedPoints1;
126  }
127 
130  void
132  {
133  m_SeedPoints2 = points;
134  this->Modified();
135  }
139  NodeContainerPointer
141  {
142  return m_SeedPoints2;
143  }
144 
145  itkSetMacro(NegativeEpsilon, double);
146  itkGetConstMacro(NegativeEpsilon, double);
147 
148  itkSetMacro(ApplyConnectivity, bool);
149  itkGetConstMacro(ApplyConnectivity, bool);
150  itkBooleanMacro(ApplyConnectivity);
151 
152  itkSetMacro(StopOnTargets, bool);
153  itkGetConstMacro(StopOnTargets, bool);
154  itkBooleanMacro(StopOnTargets);
155 
156 #ifdef ITK_USE_CONCEPT_CHECKING
157  // Begin concept checking
158  itkConceptMacro(InputHasNumericTraitsCheck, (Concept::HasNumericTraits<InputPixelType>));
159  // End concept checking
160 #endif
161 
162 protected:
164  ~CollidingFrontsImageFilter() override = default;
165 
166  void
167  GenerateData() override;
168 
169  void
170  PrintSelf(std::ostream &, Indent) const override;
171 
172 private:
173  NodeContainerPointer m_SeedPoints1{};
174  NodeContainerPointer m_SeedPoints2{};
175 
176  bool m_StopOnTargets{};
177  bool m_ApplyConnectivity{};
178 
179  double m_NegativeEpsilon{};
180 };
181 } // end namespace itk
182 
183 #ifndef ITK_MANUAL_INSTANTIATION
184 # include "itkCollidingFrontsImageFilter.hxx"
185 #endif
186 
187 #endif
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
itk::FastMarchingImageFilter::PixelType
typename LevelSetType::PixelType PixelType
Definition: itkFastMarchingImageFilter.h:156
itk::CollidingFrontsImageFilter::SetSeedPoints2
void SetSeedPoints2(NodeContainer *points)
Definition: itkCollidingFrontsImageFilter.h:131
itk::Concept::HasNumericTraits
Definition: itkConceptChecking.h:716
itk::ImageSource::OutputImagePointer
typename OutputImageType::Pointer OutputImagePointer
Definition: itkImageSource.h:91
itk::CollidingFrontsImageFilter::PixelType
typename FastMarchingUpwindGradientImageFilterType::PixelType PixelType
Definition: itkCollidingFrontsImageFilter.h:104
itk::SmartPointer< Self >
itk::CollidingFrontsImageFilter::IndexType
typename FastMarchingUpwindGradientImageFilterType::IndexType IndexType
Definition: itkCollidingFrontsImageFilter.h:109
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::CollidingFrontsImageFilter::SetSeedPoints1
void SetSeedPoints1(NodeContainer *points)
Definition: itkCollidingFrontsImageFilter.h:114
itk::FastMarchingUpwindGradientImageFilter
Generates the upwind gradient field of fast marching arrival times.
Definition: itkFastMarchingUpwindGradientImageFilter.h:88
itk::CollidingFrontsImageFilter::GetSeedPoints1
NodeContainerPointer GetSeedPoints1()
Definition: itkCollidingFrontsImageFilter.h:123
itk::CollidingFrontsImageFilter::GradientImageType
typename FastMarchingUpwindGradientImageFilterType::GradientImageType GradientImageType
Definition: itkCollidingFrontsImageFilter.h:108
itk::FastMarchingImageFilter::NodeType
typename LevelSetType::NodeType NodeType
Definition: itkFastMarchingImageFilter.h:157
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::ImageToImageFilter
Base class for filters that take an image as input and produce an image as output.
Definition: itkImageToImageFilter.h:108
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::CollidingFrontsImageFilter::NodeContainerPointer
typename FastMarchingUpwindGradientImageFilterType::NodeContainerPointer NodeContainerPointer
Definition: itkCollidingFrontsImageFilter.h:107
itk::ImageToImageFilter::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkImageToImageFilter.h:130
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itk::CollidingFrontsImageFilter::NodeType
typename FastMarchingUpwindGradientImageFilterType::NodeType NodeType
Definition: itkCollidingFrontsImageFilter.h:105
itkImageToImageFilter.h
itk::NumericTraits
Define additional traits for native types such as int or float.
Definition: itkNumericTraits.h:60
itk::CollidingFrontsImageFilter::RealType
typename NumericTraits< InputPixelType >::RealType RealType
Definition: itkCollidingFrontsImageFilter.h:82
itk::CollidingFrontsImageFilter::LevelSetImageType
TOutputImage LevelSetImageType
Definition: itkCollidingFrontsImageFilter.h:93
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:65
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::FastMarchingImageFilter::NodeContainer
typename LevelSetType::NodeContainer NodeContainer
Definition: itkFastMarchingImageFilter.h:159
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:139
itk::CollidingFrontsImageFilter
Selects a region of space where two independent fronts run towards each other.
Definition: itkCollidingFrontsImageFilter.h:61
itk::FastMarchingImageFilter::NodeContainerPointer
typename LevelSetType::NodeContainerPointer NodeContainerPointer
Definition: itkFastMarchingImageFilter.h:160
itkFastMarchingUpwindGradientImageFilter.h
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:88
itk::CollidingFrontsImageFilter::InputPixelType
typename TInputImage::PixelType InputPixelType
Definition: itkCollidingFrontsImageFilter.h:81
itk::CollidingFrontsImageFilter::SpeedImageType
TInputImage SpeedImageType
Definition: itkCollidingFrontsImageFilter.h:90
itk::CollidingFrontsImageFilter::GetSeedPoints2
NodeContainerPointer GetSeedPoints2()
Definition: itkCollidingFrontsImageFilter.h:140
itk::CollidingFrontsImageFilter::NodeContainer
typename FastMarchingUpwindGradientImageFilterType::NodeContainer NodeContainer
Definition: itkCollidingFrontsImageFilter.h:106
itk::CollidingFrontsImageFilter::OutputPixelType
typename TOutputImage::PixelType OutputPixelType
Definition: itkCollidingFrontsImageFilter.h:80
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90