X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpExtensions%2FAlgorithms%2FParallelImageMean.h;h=6122ce37362cd5c7ba17ce7186e9a4328f184ba5;hb=8eaa2cf759c39233848cdd5b8346faccbea4c172;hp=f34ca6e5f2cf7bb9cc62179c44851625f1dc2786;hpb=2361f4f97631e09d88d8a5510a369817dcaa19db;p=cpPlugins.git diff --git a/lib/cpExtensions/Algorithms/ParallelImageMean.h b/lib/cpExtensions/Algorithms/ParallelImageMean.h index f34ca6e..6122ce3 100644 --- a/lib/cpExtensions/Algorithms/ParallelImageMean.h +++ b/lib/cpExtensions/Algorithms/ParallelImageMean.h @@ -11,57 +11,59 @@ #include namespace cpExtensions +{ + namespace Algorithms { - namespace Algorithms + /** + */ + template< class I > + class ParallelImageMean + : public itk::DomainThreader< itk::ThreadedImageRegionPartitioner< I::ImageDimension >, I > { - /** - */ - template< class I > - class ParallelImageMean - : public itk::DomainThreader< itk::ThreadedImageRegionPartitioner< I::ImageDimension >, I > - { - public: - // Standard ITK typedefs. - typedef itk::DomainThreader< itk::ThreadedImageRegionPartitioner< I::ImageDimension >, I > Superclass; - typedef ParallelImageMean Self; - typedef itk::SmartPointer< Self > Pointer; - typedef itk::SmartPointer< const Self > ConstPointer; + public: + // Standard ITK typedefs. + typedef itk::DomainThreader< itk::ThreadedImageRegionPartitioner< I::ImageDimension >, I > Superclass; + typedef ParallelImageMean Self; + typedef itk::SmartPointer< Self > Pointer; + typedef itk::SmartPointer< const Self > ConstPointer; - typedef typename Superclass::DomainType DomainType; + typedef typename Superclass::DomainType DomainType; - typedef itk::Array< double > TMean; + typedef itk::Array< double > TMean; - protected: - typedef itk::NumericTraits< typename I::PixelType > _TPixelTraits; + protected: + typedef itk::NumericTraits< typename I::PixelType > _TPixelTraits; - public: - itkNewMacro( Self ); - itkTypeMacro( ParallelImageMean, itkDomainThreader ); + public: + itkNewMacro( Self ); + itkTypeMacro( ParallelImageMean, itkDomainThreader ); - itkGetConstMacro( Mean, TMean ); + itkGetConstMacro( Mean, TMean ); - protected: - ParallelImageMean( ); - virtual ~ParallelImageMean( ); + protected: + ParallelImageMean( ); + virtual ~ParallelImageMean( ); - private: - virtual void BeforeThreadedExecution( ); - virtual void ThreadedExecution( - const DomainType& region, const itk::ThreadIdType id - ); - virtual void AfterThreadedExecution( ); + private: + virtual void BeforeThreadedExecution( ); + virtual void ThreadedExecution( + const DomainType& region, const itk::ThreadIdType id + ); + virtual void AfterThreadedExecution( ); - protected: - itk::Array< double > m_Mean; - unsigned long m_N; - }; + protected: + itk::Array< double > m_Mean; + unsigned long m_N; + }; - } // ecapseman + } // ecapseman } // ecapseman +#ifndef ITK_MANUAL_INSTANTIATION #include +#endif // ITK_MANUAL_INSTANTIATION #endif // __CPEXTENSIONS__ALGORITHMS__PARALLELIMAGEMEAN__H__