ITK  4.4.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< class TLevelSet >
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 
122  NodeContainerPointer GetInputNarrowBand() const
123  { return m_InputNarrowBand; }
124 
126  NodeContainerPointer GetOutputNarrowBand() const
127  { return m_OutputNarrowBand; }
128 
129 #ifdef ITK_USE_CONCEPT_CHECKING
130 
131  itkConceptMacro( LevelSetDoubleAdditiveOperatorsCheck,
133  itkConceptMacro( LevelSetOStreamWritableCheck,
135 
137 #endif
138 
139 protected:
142  void PrintSelf(std::ostream & os, Indent indent) const;
143 
148 
149  void GenerateData();
150 
151  virtual void GenerateDataFull();
152 
153  virtual void GenerateDataNarrowBand();
154 
155  virtual void AllocateOutput();
156 
157  virtual void GenerateInputRequestedRegion();
158 
159  virtual void EnlargeOutputRequestedRegion(DataObject *);
160 
161  void SetOutputNarrowBand(NodeContainer *ptr)
162  { m_OutputNarrowBand = ptr; }
163 
164 private:
165  ReinitializeLevelSetImageFilter(const Self &); //purposely not implemented
166  void operator=(const Self &); //purposely not implemented
167 
169 
171 
173 
179 };
180 } // namespace itk
181 
182 #ifndef ITK_MANUAL_INSTANTIATION
183 #include "itkReinitializeLevelSetImageFilter.hxx"
184 #endif
185 
186 #endif
187