--- /dev/null
+// -------------------------------------------------------------------------
+// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
+// -------------------------------------------------------------------------
+
+#ifndef __CPEXTENSIONS__ALGORITHMS__LIGHTCOMPENSATIONFILTER__H__
+#define __CPEXTENSIONS__ALGORITHMS__LIGHTCOMPENSATIONFILTER__H__
+
+#include <itkInPlaceImageFilter.h>
+#include <cpExtensions/Algorithms/ParallelImageMean.h>
+
+namespace cpExtensions
+{
+ namespace Algorithms
+ {
+ /**
+ */
+ template< class I >
+ class LightCompensationFilter
+ : public itk::InPlaceImageFilter< I, I >
+ {
+ public:
+ typedef LightCompensationFilter Self;
+ typedef itk::InPlaceImageFilter< I, I > Superclass;
+ typedef itk::SmartPointer< Self > Pointer;
+ typedef itk::SmartPointer< const Self > ConstPointer;
+
+ typedef I TImage;
+ typedef typename I::RegionType TRegion;
+
+ typedef cpExtensions::Algorithms::ParallelImageMean< I > TMeanCalculator;
+ typedef typename TMeanCalculator::TMean TMean;
+
+ public:
+ itkNewMacro( Self );
+ itkTypeMacro( LightCompensationFilter, itkInPlaceImageFilter );
+
+ itkGetConstMacro( Mean, TMean );
+
+ protected:
+ LightCompensationFilter( );
+ virtual ~LightCompensationFilter( );
+
+ private:
+ virtual void BeforeThreadedGenerateData( );
+ virtual void ThreadedGenerateData(
+ const TRegion& region, itk::ThreadIdType id
+ );
+ virtual void AfterThreadedGenerateData( );
+
+ protected:
+ TMean m_Mean;
+ TMean m_Coefficient;
+ };
+
+ } // ecapseman
+
+} // ecapseman
+
+#ifndef ITK_MANUAL_INSTANTIATION
+#include <cpExtensions/Algorithms/LightCompensationFilter.hxx>
+#endif // ITK_MANUAL_INSTANTIATION
+
+#endif // __CPEXTENSIONS__ALGORITHMS__LIGHTCOMPENSATIONFILTER__H__
+
+// eof - $RCSfile$