ITK  4.12.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:
64 
66  itkNewMacro(Self);
67 
70 
77  typedef typename LevelSetType::NodeType NodeType;
80 
82  itkStaticConstMacro(SetDimension, unsigned int,
83  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,
101  itkGetConstMacro(InputNarrowBandwidth, double);
103 
105  itkSetClampMacro( OutputNarrowBandwidth, double, 0.0,
107  itkGetConstMacro(OutputNarrowBandwidth, double);
109 
112  void SetNarrowBandwidth(double value)
113  {
114  this->SetInputNarrowBandwidth(value);
115  this->SetOutputNarrowBandwidth(value);
116  }
118 
120  void SetInputNarrowBand(NodeContainer *ptr);
121 
123  { return m_InputNarrowBand; }
124 
127  { return m_OutputNarrowBand; }
128 
129 #ifdef ITK_USE_CONCEPT_CHECKING
130  // Begin concept checking
131  itkConceptMacro( LevelSetDoubleAdditiveOperatorsCheck,
133  itkConceptMacro( LevelSetOStreamWritableCheck,
135  // End concept checking
136 #endif
137 
138 protected:
141  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
142 
147 
148  void GenerateData() ITK_OVERRIDE;
149 
150  virtual void GenerateDataFull();
151 
152  virtual void GenerateDataNarrowBand();
153 
154  virtual void AllocateOutput();
155 
156  virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
157 
158  virtual void EnlargeOutputRequestedRegion(DataObject *) ITK_OVERRIDE;
159 
160  void SetOutputNarrowBand(NodeContainer *ptr)
161  { m_OutputNarrowBand = ptr; }
162 
163 private:
164  ITK_DISALLOW_COPY_AND_ASSIGN(ReinitializeLevelSetImageFilter);
165 
166  double m_LevelSetValue;
167 
169 
171 
177 };
178 } // namespace itk
179 
180 #ifndef ITK_MANUAL_INSTANTIATION
181 #include "itkReinitializeLevelSetImageFilter.hxx"
182 #endif
183 
184 #endif
LevelSetType::LevelSetConstPointer LevelSetConstPointer
virtual void PrintSelf(std::ostream &os, Indent indent) const override
Locate pixels of a particular level set.
Light weight base class for most itk classes.
TLevelSet::PixelType PixelType
Definition: itkLevelSet.h:55
FastMarchingImageFilter< TLevelSet, SpeedImageType > FastMarchingImageFilterType
Image< float, itkGetStaticConstMacro(SetDimension) > SpeedImageType
Represent a node in a level set.
TLevelSet::ConstPointer LevelSetConstPointer
Definition: itkLevelSet.h:52
LevelSetNeighborhoodExtractor< TLevelSet > LocatorType
LevelSetType::NodeContainerPointer NodeContainerPointer
Base class for all data objects in ITK.
Reinitialize the level set to the signed distance function.
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
Define additional traits for native types such as int or float.
Solve an Eikonal equation using Fast Marching.
#define itkConceptMacro(name, concept)
Level set type information.
Definition: itkLevelSet.h:40
ImageToImageFilter< TLevelSet, TLevelSet > Superclass
Templated n-dimensional image class.
Definition: itkImage.h:75
TLevelSet::Pointer LevelSetPointer
Definition: itkLevelSet.h:51