Orfeo Toolbox  4.0
itkNarrowBandLevelSetImageFilter.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 __itkNarrowBandLevelSetImageFilter_h
19 #define __itkNarrowBandLevelSetImageFilter_h
20 
25 
26 namespace itk
27 {
142 template< typename TInputImage,
143  typename TFeatureImage,
144  typename TOutputPixelType = float,
145  typename TOutputImage = Image< TOutputPixelType,
146  TInputImage::ImageDimension > >
148  public NarrowBandImageFilterBase< TInputImage, TOutputImage >
149 {
150 public:
156 
162 
164  typedef TOutputImage OutputImageType;
165  typedef TFeatureImage FeatureImageType;
166 
170 
173 
176 
179  virtual void SetFeatureImage(const FeatureImageType *f)
180  {
181  this->ProcessObject::SetNthInput( 1, const_cast< FeatureImageType * >( f ) );
183  }
184 
186  {
187  return ( static_cast< FeatureImageType * >( this->ProcessObject::GetInput(1) ) );
188  }
189 
193  {
194  this->SetInput(f);
195  }
196 
197  virtual const typename SegmentationFunctionType::ImageType * GetSpeedImage() const
199 
202 
207  {
208  itkWarningMacro(
209  << "SetUseNegativeFeaturesOn has been deprecated. Please use ReverseExpansionDirectionOn() instead");
211  }
212 
214  {
215  itkWarningMacro(
216  << "SetUseNegativeFeaturesOff has been deprecated. Please use ReverseExpansionDirectionOff() instead");
218  }
219 
223  {
224  itkWarningMacro(<< "SetUseNegativeFeatures has been deprecated. Please use SetReverseExpansionDirection instead");
225  if ( u == true )
226  {
227  this->SetReverseExpansionDirection(false);
228  }
229  else
230  {
231  this->SetReverseExpansionDirection(true);
232  }
233  }
234 
236  {
237  itkWarningMacro(<< "GetUseNegativeFeatures has been deprecated. Please use GetReverseExpansionDirection() instead");
238  if ( this->GetReverseExpansionDirection() == false )
239  {
240  return true;
241  }
242  else
243  {
244  return false;
245  }
246  }
247 
256  itkSetMacro(ReverseExpansionDirection, bool);
257  itkGetConstMacro(ReverseExpansionDirection, bool);
258  itkBooleanMacro(ReverseExpansionDirection);
259 
265  {
267  {
268  this->SetPropagationScaling(v);
269  }
271  {
272  this->SetAdvectionScaling(v);
273  }
274  }
275 
279  {
281  {
283  }
284  }
285 
287  {
289  }
290 
294  {
296  {
298  }
299  }
300 
302  {
304  }
305 
311  {
313  {
315  }
316  }
317 
319  {
321  }
322 
326 
328  { return m_SegmentationFunction; }
329 
332  void SetMaximumIterations(unsigned int i)
333  {
334  itkWarningMacro("SetMaximumIterations is deprecated. Please use SetNumberOfIterations instead.");
335  this->SetNumberOfIterations(i);
336  }
337 
338  unsigned int GetMaximumIterations()
339  {
340  itkWarningMacro("GetMaximumIterations is deprecated. Please use GetNumberOfIterations instead.");
341  return this->GetNumberOfIterations();
342  }
343 
344  virtual void SetMaximumRMSError(const double)
345  {
346  itkWarningMacro(
347  "The current implmentation of this solver does not compute maximum RMS change. The maximum RMS error value will not be set or used.");
348  }
349 
350 #ifdef ITK_USE_CONCEPT_CHECKING
351  // Begin concept checking
352  itkConceptMacro( OutputHasNumericTraitsCheck,
354  // End concept checking
355 #endif
356 
357 protected:
360  NarrowBandLevelSetImageFilter(const Self &); //purposely not implemented
361 
362  virtual void PrintSelf(std::ostream & os, Indent indent) const;
363 
364  void operator=(const Self &); //purposely not implemented
365 
367  virtual void InitializeIteration()
368  {
370  // Estimate the progress of the filter
371  this->UpdateProgress( (float)( (float)this->GetElapsedIterations()
372  / (float)this->GetNumberOfIterations() ) );
373  }
374 
378  virtual void CreateNarrowBand();
379 
382  void GenerateData();
383 
387 
394 
396 
398 
399 private:
401 };
402 } // end namespace itk
403 
404 #ifndef ITK_MANUAL_INSTANTIATION
406 #endif
407 
408 #endif

Generated at Sat Mar 8 2014 15:16:08 for Orfeo Toolbox with doxygen 1.8.3.1