ITK  5.2.0
Insight Toolkit
itkReinitializeLevelSetImageFilter.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 #ifndef itkReinitializeLevelSetImageFilter_h
19 #define itkReinitializeLevelSetImageFilter_h
20 
23 
24 namespace itk
25 {
54 template <typename TLevelSet>
55 class ITK_TEMPLATE_EXPORT ReinitializeLevelSetImageFilter : public ImageToImageFilter<TLevelSet, TLevelSet>
56 {
57 public:
58  ITK_DISALLOW_COPY_AND_MOVE(ReinitializeLevelSetImageFilter);
59 
65 
67  itkNewMacro(Self);
68 
71 
78  using NodeType = typename LevelSetType::NodeType;
81 
83  static constexpr unsigned int SetDimension = LevelSetType::SetDimension;
84 
87  itkSetMacro(LevelSetValue, double);
88  itkGetConstMacro(LevelSetValue, double);
90 
93  itkSetMacro(NarrowBanding, bool);
94  itkGetConstMacro(NarrowBanding, bool);
95  itkBooleanMacro(NarrowBanding);
97 
99  itkSetClampMacro(InputNarrowBandwidth, double, 0.0, NumericTraits<double>::max());
100  itkGetConstMacro(InputNarrowBandwidth, double);
102 
104  itkSetClampMacro(OutputNarrowBandwidth, double, 0.0, NumericTraits<double>::max());
105  itkGetConstMacro(OutputNarrowBandwidth, double);
107 
110  void
111  SetNarrowBandwidth(double value)
112  {
113  this->SetInputNarrowBandwidth(value);
114  this->SetOutputNarrowBandwidth(value);
115  }
117 
119  void
120  SetInputNarrowBand(NodeContainer * ptr);
121 
122  NodeContainerPointer
124  {
125  return m_InputNarrowBand;
126  }
127 
129  NodeContainerPointer
131  {
132  return m_OutputNarrowBand;
133  }
134 
135 #ifdef ITK_USE_CONCEPT_CHECKING
136  // Begin concept checking
137  itkConceptMacro(LevelSetDoubleAdditiveOperatorsCheck, (Concept::AdditiveOperators<PixelType, double>));
138  itkConceptMacro(LevelSetOStreamWritableCheck, (Concept::OStreamWritable<PixelType>));
139  // End concept checking
140 #endif
141 
142 protected:
144  ~ReinitializeLevelSetImageFilter() override = default;
145  void
146  PrintSelf(std::ostream & os, Indent indent) const override;
147 
152 
153  void
154  GenerateData() override;
155 
156  virtual void
157  GenerateDataFull();
158 
159  virtual void
160  GenerateDataNarrowBand();
161 
162  virtual void
163  AllocateOutput();
164 
165  void
166  GenerateInputRequestedRegion() override;
167 
168  void
169  EnlargeOutputRequestedRegion(DataObject *) override;
170 
171  void
173  {
174  m_OutputNarrowBand = ptr;
175  }
176 
177 private:
179 
181 
183 
189 };
190 } // namespace itk
191 
192 #ifndef ITK_MANUAL_INSTANTIATION
193 # include "itkReinitializeLevelSetImageFilter.hxx"
194 #endif
195 
196 #endif
itk::ReinitializeLevelSetImageFilter::LevelSetConstPointer
typename LevelSetType::LevelSetConstPointer LevelSetConstPointer
Definition: itkReinitializeLevelSetImageFilter.h:76
itk::ReinitializeLevelSetImageFilter::SetOutputNarrowBand
void SetOutputNarrowBand(NodeContainer *ptr)
Definition: itkReinitializeLevelSetImageFilter.h:172
itk::LevelSetTypeDefault
Level set type information.
Definition: itkLevelSet.h:40
itk::Concept::OStreamWritable
Definition: itkConceptChecking.h:636
itk::ReinitializeLevelSetImageFilter::m_OutputNarrowBand
NodeContainerPointer m_OutputNarrowBand
Definition: itkReinitializeLevelSetImageFilter.h:188
itk::ReinitializeLevelSetImageFilter::GetOutputNarrowBand
NodeContainerPointer GetOutputNarrowBand() const
Definition: itkReinitializeLevelSetImageFilter.h:130
itk::ReinitializeLevelSetImageFilter::NodeContainerPointer
typename LevelSetType::NodeContainerPointer NodeContainerPointer
Definition: itkReinitializeLevelSetImageFilter.h:80
itk::ReinitializeLevelSetImageFilter::m_OutputNarrowBandwidth
double m_OutputNarrowBandwidth
Definition: itkReinitializeLevelSetImageFilter.h:186
itk::ReinitializeLevelSetImageFilter::NodeType
typename LevelSetType::NodeType NodeType
Definition: itkReinitializeLevelSetImageFilter.h:78
itk::ReinitializeLevelSetImageFilter::PixelType
typename LevelSetType::PixelType PixelType
Definition: itkReinitializeLevelSetImageFilter.h:77
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ReinitializeLevelSetImageFilter::m_InputNarrowBandwidth
double m_InputNarrowBandwidth
Definition: itkReinitializeLevelSetImageFilter.h:185
itk::LevelSetNode
Represent a node in a level set.
Definition: itkLevelSetNode.h:45
itkFastMarchingImageFilter.h
itk::ReinitializeLevelSetImageFilter::SetNarrowBandwidth
void SetNarrowBandwidth(double value)
Definition: itkReinitializeLevelSetImageFilter.h:111
itk::ReinitializeLevelSetImageFilter::m_NarrowBanding
bool m_NarrowBanding
Definition: itkReinitializeLevelSetImageFilter.h:184
itk::ImageToImageFilter
Base class for filters that take an image as input and produce an image as output.
Definition: itkImageToImageFilter.h:108
itk::ReinitializeLevelSetImageFilter::m_InputNarrowBand
NodeContainerPointer m_InputNarrowBand
Definition: itkReinitializeLevelSetImageFilter.h:187
itk::LevelSetTypeDefault::LevelSetPointer
typename TLevelSet::Pointer LevelSetPointer
Definition: itkLevelSet.h:51
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::FastMarchingImageFilter
Solve an Eikonal equation using Fast Marching.
Definition: itkFastMarchingImageFilter.h:136
itk::LevelSetTypeDefault::NodeContainerPointer
typename NodeContainer::Pointer NodeContainerPointer
Definition: itkLevelSet.h:64
itk::ReinitializeLevelSetImageFilter::m_LevelSetValue
double m_LevelSetValue
Definition: itkReinitializeLevelSetImageFilter.h:178
itk::ReinitializeLevelSetImageFilter::m_Marcher
FastMarchingImageFilterType::Pointer m_Marcher
Definition: itkReinitializeLevelSetImageFilter.h:182
itk::ReinitializeLevelSetImageFilter::NodeContainer
typename LevelSetType::NodeContainer NodeContainer
Definition: itkReinitializeLevelSetImageFilter.h:79
itk::LevelSetTypeDefault::LevelSetConstPointer
typename TLevelSet::ConstPointer LevelSetConstPointer
Definition: itkLevelSet.h:52
itk::NumericTraits
Define additional traits for native types such as int or float.
Definition: itkNumericTraits.h:58
itk::LevelSetTypeDefault::LevelSetImageType
TLevelSet LevelSetImageType
Definition: itkLevelSet.h:45
itk::Concept::AdditiveOperators
Definition: itkConceptChecking.h:358
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:65
itk::ReinitializeLevelSetImageFilter::LevelSetImageType
typename LevelSetType::LevelSetImageType LevelSetImageType
Definition: itkReinitializeLevelSetImageFilter.h:74
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ReinitializeLevelSetImageFilter::LevelSetPointer
typename LevelSetType::LevelSetPointer LevelSetPointer
Definition: itkReinitializeLevelSetImageFilter.h:75
itk::ReinitializeLevelSetImageFilter::GetInputNarrowBand
NodeContainerPointer GetInputNarrowBand() const
Definition: itkReinitializeLevelSetImageFilter.h:123
itk::ReinitializeLevelSetImageFilter::m_Locator
LocatorType::Pointer m_Locator
Definition: itkReinitializeLevelSetImageFilter.h:180
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:86
itk::LevelSetTypeDefault::PixelType
typename TLevelSet::PixelType PixelType
Definition: itkLevelSet.h:55
itkLevelSetNeighborhoodExtractor.h
itk::VectorContainer
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
Definition: itkVectorContainer.h:48
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293
itk::LevelSetNeighborhoodExtractor
Locate pixels of a particular level set.
Definition: itkLevelSetNeighborhoodExtractor.h:57
itk::ReinitializeLevelSetImageFilter
Reinitialize the level set to the signed distance function.
Definition: itkReinitializeLevelSetImageFilter.h:55