1 // -------------------------------------------------------------------------
2 // @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
3 // -------------------------------------------------------------------------
5 #ifndef __CPPLUGINS__EXTENSIONS__ALGORITHMS__PARALLELIMAGEMEAN__H__
6 #define __CPPLUGINS__EXTENSIONS__ALGORITHMS__PARALLELIMAGEMEAN__H__
8 #include <itkDomainThreader.h>
9 #include <itkThreadedImageRegionPartitioner.h>
11 #include <itkNumericTraits.h>
22 class ParallelImageMean
23 : public itk::DomainThreader< itk::ThreadedImageRegionPartitioner< I::ImageDimension >, I >
26 // Standard ITK typedefs.
27 typedef itk::DomainThreader< itk::ThreadedImageRegionPartitioner< I::ImageDimension >, I > Superclass;
28 typedef ParallelImageMean Self;
29 typedef itk::SmartPointer< Self > Pointer;
30 typedef itk::SmartPointer< const Self > ConstPointer;
32 typedef typename Superclass::DomainType DomainType;
34 typedef itk::Array< double > TMean;
37 typedef itk::NumericTraits< typename I::PixelType > _TPixelTraits;
42 itkTypeMacro( ParallelImageMean, itkDomainThreader );
44 itkGetConstMacro( Mean, TMean );
48 virtual ~ParallelImageMean( );
51 virtual void BeforeThreadedExecution( );
52 virtual void ThreadedExecution(
53 const DomainType& region, const itk::ThreadIdType id
55 virtual void AfterThreadedExecution( );
58 itk::Array< double > m_Mean;
68 #include <cpPlugins/Extensions/Algorithms/ParallelImageMean.hxx>
70 #endif // __CPPLUGINS__EXTENSIONS__ALGORITHMS__PARALLELIMAGEMEAN__H__