1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
/*=========================================================================
Program: Advanced Normalization Tools
Module: $RCSfile: itkBlueColormapFunctor.txx,v $
Language: C++
Date: $Date: 2009-05-15 02:47:59 $
Version: $Revision: 1.1 $
Copyright (c) ConsortiumOfANTS. All rights reserved.
See accompanying COPYING.txt or
http://sourceforge.net/projects/advants/files/ANTS/ANTSCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __itkBlueColormapFunctor_txx
#define __itkBlueColormapFunctor_txx
#include "itkBlueColormapFunctor.h"
namespace itk {
namespace Functor {
template <class TScalar, class TRGBPixel>
typename BlueColormapFunctor<TScalar, TRGBPixel>::RGBPixelType
BlueColormapFunctor<TScalar, TRGBPixel>
::operator()( const TScalar & v ) const
{
// Map the input scalar between [0, 1].
RealType value = this->RescaleInputValue( v );
// Set the rgb components after rescaling the values.
RGBPixelType pixel;
pixel[0] = 0;
pixel[1] = 0;
pixel[2] = this->RescaleRGBComponentValue( value );
return pixel;
}
} // end namespace Functor
} // end namespace itk
#endif
|