void cpPlugins::Extensions::Algorithms::LightCompensationFilter< I >::
BeforeThreadedGenerateData( )
{
+ this->Superclass::BeforeThreadedGenerateData( );
+
I* input = const_cast< I* >( this->GetInput( ) );
typename TMeanCalculator::Pointer mc = TMeanCalculator::New( );
double r = double( iIt.Get( )[ 0 ] ) * this->m_Coefficient[ 0 ];
double g = double( iIt.Get( )[ 1 ] ) * this->m_Coefficient[ 1 ];
double b = double( iIt.Get( )[ 2 ] ) * this->m_Coefficient[ 2 ];
+
if( r > max_value ) r = max_value;
if( g > max_value ) g = max_value;
if( b > max_value ) b = max_value;
- oIt.Get( ).Set(
- _TPixelChannel( r ), _TPixelChannel( g ), _TPixelChannel( b )
- );
+
+ typename I::PixelType pix;
+ pix.SetRed( _TPixelChannel( r ) );
+ pix.SetGreen( _TPixelChannel( g ) );
+ pix.SetBlue( _TPixelChannel( b ) );
+
+ oIt.Set( pix );
} // rof
}
void cpPlugins::Extensions::Algorithms::LightCompensationFilter< I >::
AfterThreadedGenerateData( )
{
+ this->Superclass::AfterThreadedGenerateData( );
}
#endif // __CPPLUGINS__EXTENSIONS__ALGORITHMS__LIGHTCOMPENSATIONFILTER__HXX__