ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkReinitializeLevelSetImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 #ifndef itkReinitializeLevelSetImageFilter_h
19 #define itkReinitializeLevelSetImageFilter_h
20 
23 
24 namespace itk
25 {
54 template< typename TLevelSet >
55 class ITK_TEMPLATE_EXPORT ReinitializeLevelSetImageFilter:
56  public ImageToImageFilter< TLevelSet, TLevelSet >
57 {
58 public:
59  ITK_DISALLOW_COPY_AND_ASSIGN(ReinitializeLevelSetImageFilter);
60 
66 
68  itkNewMacro(Self);
69 
72 
79  using NodeType = typename LevelSetType::NodeType;
82 
84  static constexpr unsigned int SetDimension = LevelSetType::SetDimension;
85 
88  itkSetMacro(LevelSetValue, double);
89  itkGetConstMacro(LevelSetValue, double);
91 
94  itkSetMacro(NarrowBanding, bool);
95  itkGetConstMacro(NarrowBanding, bool);
96  itkBooleanMacro(NarrowBanding);
98 
100  itkSetClampMacro( InputNarrowBandwidth, double, 0.0,
102  itkGetConstMacro(InputNarrowBandwidth, double);
104 
106  itkSetClampMacro( OutputNarrowBandwidth, double, 0.0,
108  itkGetConstMacro(OutputNarrowBandwidth, double);
110 
113  void SetNarrowBandwidth(double value)
114  {
115  this->SetInputNarrowBandwidth(value);
116  this->SetOutputNarrowBandwidth(value);
117  }
119 
121  void SetInputNarrowBand(NodeContainer *ptr);
122 
124  { return m_InputNarrowBand; }
125 
128  { return m_OutputNarrowBand; }
129 
130 #ifdef ITK_USE_CONCEPT_CHECKING
131  // Begin concept checking
132  itkConceptMacro( LevelSetDoubleAdditiveOperatorsCheck,
134  itkConceptMacro( LevelSetOStreamWritableCheck,
136  // End concept checking
137 #endif
138 
139 protected:
141  ~ReinitializeLevelSetImageFilter() override = default;
142  void PrintSelf(std::ostream & os, Indent indent) const override;
143 
148 
149  void GenerateData() override;
150 
151  virtual void GenerateDataFull();
152 
153  virtual void GenerateDataNarrowBand();
154 
155  virtual void AllocateOutput();
156 
157  void GenerateInputRequestedRegion() override;
158 
159  void EnlargeOutputRequestedRegion(DataObject *) override;
160 
162  { m_OutputNarrowBand = ptr; }
163 
164 private:
166 
168 
170 
176 };
177 } // namespace itk
178 
179 #ifndef ITK_MANUAL_INSTANTIATION
180 #include "itkReinitializeLevelSetImageFilter.hxx"
181 #endif
182 
183 #endif
Locate pixels of a particular level set.
typename NodeContainer::Pointer NodeContainerPointer
Definition: itkLevelSet.h:65
Light weight base class for most itk classes.
Define numeric traits for std::vector.
typename TLevelSet::Pointer LevelSetPointer
Definition: itkLevelSet.h:51
typename TLevelSet::PixelType PixelType
Definition: itkLevelSet.h:55
typename LevelSetType::NodeContainer NodeContainer
typename LevelSetType::LevelSetImageType LevelSetImageType
Represent a node in a level set.
typename TLevelSet::ConstPointer LevelSetConstPointer
Definition: itkLevelSet.h:52
typename LevelSetType::NodeContainerPointer NodeContainerPointer
Reinitialize the level set to the signed distance function.
typename LevelSetType::LevelSetPointer LevelSetPointer
Base class for filters that take an image as input and produce an image as output.
Define a front-end to the STL &quot;vector&quot; container that conforms to the IndexedContainerInterface.
FastMarchingImageFilterType::Pointer m_Marcher
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Solve an Eikonal equation using Fast Marching.
#define itkConceptMacro(name, concept)
typename LevelSetType::LevelSetConstPointer LevelSetConstPointer
Level set type information.
Definition: itkLevelSet.h:40
Base class for all data objects in ITK.
Templated n-dimensional image class.
Definition: itkImage.h:75