1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
5 - University of LYON http://www.universite-lyon.fr/
6 - Léon Bérard cancer center http://www.centreleonberard.fr
7 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the copyright notices for more information.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
18 #ifndef __clitkInvertVFFilter_h
19 #define __clitkInvertVFFilter_h
20 #include "clitkImageCommon.h"
22 #include "itkImageToImageFilter.h"
24 #include "itkImageRegionIterator.h"
25 #include "itkImageRegionIteratorWithIndex.h"
26 #include "itkNumericTraits.h"
31 template <class InputImageType, class OutputImageType>
32 class ITK_EXPORT InvertVFFilter : public itk::ImageToImageFilter<InputImageType, OutputImageType>
36 typedef InvertVFFilter Self;
37 typedef itk::ImageToImageFilter<InputImageType, OutputImageType> Superclass;
38 typedef itk::SmartPointer<Self> Pointer;
39 typedef itk::SmartPointer<const Self> ConstPointer;
41 /** Method for creation through the object factory. */
44 /** Run-time type information (and related methods) */
45 itkTypeMacro( InvertVFFilter, ImageToImageFilter );
47 /** Determine the image dimension. */
48 itkStaticConstMacro(ImageDimension, unsigned int,
49 InputImageType::ImageDimension );
52 typedef double CoordRepType;
53 typedef itk::Image<double, ImageDimension> WeightsImageType;
54 typedef itk::Image<itk::SimpleFastMutexLock, ImageDimension> MutexImageType;
57 typedef itk::Point<CoordRepType,itkGetStaticConstMacro(ImageDimension)> PointType;
59 /** Inherit some types from the superclass. */
60 typedef typename OutputImageType::IndexType IndexType;
61 typedef typename OutputImageType::SizeType SizeType;
62 typedef typename OutputImageType::PixelType PixelType;
63 typedef typename OutputImageType::SpacingType SpacingType;
66 itkSetMacro( Verbose, bool);
67 itkSetMacro( EdgePaddingValue, PixelType );
68 void SetNumberOfThreads(unsigned int r )
70 m_NumberOfThreadsIsGiven=true;
73 itkSetMacro(ThreadSafe, bool);
82 bool m_NumberOfThreadsIsGiven;
83 unsigned int m_NumberOfThreads;
84 PixelType m_EdgePaddingValue;
89 } // end namespace clitk
90 #ifndef ITK_MANUAL_INSTANTIATION
91 #include "clitkInvertVFFilter.txx"
94 #endif // #define __clitkInvertVFFilter_h