Orfeo Toolbox  4.0
itkFiniteDifferenceImageFilter.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 __itkFiniteDifferenceImageFilter_h
19 #define __itkFiniteDifferenceImageFilter_h
20 
21 #include "itkInPlaceImageFilter.h"
23 
24 namespace itk
25 {
131 template< typename TInputImage, typename TOutputImage >
133  public InPlaceImageFilter< TInputImage, TOutputImage >
134 {
135 public:
141 
144 
146  typedef TInputImage InputImageType;
147  typedef TOutputImage OutputImageType;
148 
150  itkStaticConstMacro(ImageDimension, unsigned int, OutputImageType::ImageDimension);
151 
153  typedef typename TOutputImage::PixelType OutputPixelType;
154  typedef typename TInputImage::PixelType InputPixelType;
156 
160 
166 
169 
171  itkGetConstReferenceMacro(ElapsedIterations, IdentifierType);
172 
176  itkGetConstReferenceObjectMacro(DifferenceFunction,
178 
182  itkSetObjectMacro(DifferenceFunction, FiniteDifferenceFunctionType);
183 
185  itkSetMacro(NumberOfIterations, IdentifierType);
186  itkGetConstReferenceMacro(NumberOfIterations, IdentifierType);
187 
190  itkSetMacro(UseImageSpacing, bool);
191  itkBooleanMacro(UseImageSpacing);
192  itkGetConstReferenceMacro(UseImageSpacing, bool);
193 
196  itkSetMacro(MaximumRMSError, double);
197  itkGetConstReferenceMacro(MaximumRMSError, double);
198 
201  itkSetMacro(RMSChange, double);
202  itkGetConstReferenceMacro(RMSChange, double);
203 
206  itkSetMacro(ManualReinitialization, bool);
207  itkGetConstReferenceMacro(ManualReinitialization, bool);
208  itkBooleanMacro(ManualReinitialization);
209 
210  itkSetMacro( IsInitialized, bool );
211  itkGetMacro( IsInitialized, bool );
212 
213  void SetStateToUninitialized() { this->SetIsInitialized( false ); }
214  void SetStateToInitialized() { this->SetIsInitialized( true ); }
215 
216 #ifdef ITK_USE_STRICT_CONCEPT_CHECKING
217  // Begin concept checking
218  itkConceptMacro( OutputPixelIsFloatingPointCheck,
220  // End concept checking
221 #endif
222 
223 protected:
224 
227 
230 
231  void PrintSelf(std::ostream & os, Indent indent) const;
232 
234  virtual void AllocateUpdateBuffer() = 0;
235 
239  virtual void ApplyUpdate(const TimeStepType& dt) = 0;
240 
246  virtual TimeStepType CalculateChange() = 0;
247 
251  virtual void CopyInputToOutput() = 0;
252 
256  virtual void GenerateData();
257 
269  virtual void GenerateInputRequestedRegion();
270 
273  virtual bool Halt();
274 
284  virtual bool ThreadedHalt( void *itkNotUsed(threadInfo) ) { return this->Halt(); }
285 
291  virtual void Initialize() {}
292 
299  virtual void InitializeIteration()
300  { m_DifferenceFunction->InitializeIteration(); }
301 
314  virtual TimeStepType ResolveTimeStep(const std::vector< TimeStepType >& timeStepList,
315  const std::vector< bool >& valid ) const;
316 
318  itkSetMacro(ElapsedIterations, IdentifierType);
319 
322  virtual void PostProcessOutput() {}
323 
326 
330 
334 
335  double m_RMSChange;
337 
338 private:
339  FiniteDifferenceImageFilter(const Self &); //purposely not implemented
340  void operator=(const Self &); //purposely not implemented
341 
346 
350 
353 };
354 } // end namespace itk
355 
356 #ifndef ITK_MANUAL_INSTANTIATION
358 #endif
359 
360 #endif

Generated at Sat Mar 8 2014 14:37:58 for Orfeo Toolbox with doxygen 1.8.3.1