Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions

itk::QBallToRgbImageFilter< TInputImage, TOutputImage > Class Template Reference

#include <itkQBallToRgbImageFilter.h>

List of all members.

Public Types

typedef QBallToRgbImageFilter Self
typedef ImageToImageFilter
< TInputImage, TOutputImage > 
Superclass
typedef SmartPointer< SelfPointer
typedef SmartPointer< const SelfConstPointer
typedef Superclass::InputImageType InputImageType
typedef Superclass::OutputImageType OutputImageType
typedef OutputImageType::PixelType OutputPixelType
typedef TInputImage::PixelType InputPixelType
typedef InputPixelType::ValueType InputValueType

Public Member Functions

virtual const char * GetClassName () const
void PrintSelf (std::ostream &os, Indent indent) const

Static Public Member Functions

static Pointer New ()

Protected Member Functions

 QBallToRgbImageFilter ()
virtual ~QBallToRgbImageFilter ()
void GenerateData ()

Detailed Description

template<typename TInputImage, typename TOutputImage = itk::Image<itk::RGBAPixel<unsigned char>,3>>
class itk::QBallToRgbImageFilter< TInputImage, TOutputImage >

Definition at line 37 of file itkQBallToRgbImageFilter.h.


Member Typedef Documentation

template<typename TInputImage , typename TOutputImage = itk::Image<itk::RGBAPixel<unsigned char>,3>>
typedef SmartPointer<const Self> itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::ConstPointer

Definition at line 46 of file itkQBallToRgbImageFilter.h.

template<typename TInputImage , typename TOutputImage = itk::Image<itk::RGBAPixel<unsigned char>,3>>
typedef Superclass::InputImageType itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::InputImageType

Definition at line 48 of file itkQBallToRgbImageFilter.h.

template<typename TInputImage , typename TOutputImage = itk::Image<itk::RGBAPixel<unsigned char>,3>>
typedef TInputImage::PixelType itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::InputPixelType

Definition at line 51 of file itkQBallToRgbImageFilter.h.

template<typename TInputImage , typename TOutputImage = itk::Image<itk::RGBAPixel<unsigned char>,3>>
typedef InputPixelType::ValueType itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::InputValueType

Definition at line 52 of file itkQBallToRgbImageFilter.h.

template<typename TInputImage , typename TOutputImage = itk::Image<itk::RGBAPixel<unsigned char>,3>>
typedef Superclass::OutputImageType itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::OutputImageType

Definition at line 49 of file itkQBallToRgbImageFilter.h.

template<typename TInputImage , typename TOutputImage = itk::Image<itk::RGBAPixel<unsigned char>,3>>
typedef OutputImageType::PixelType itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::OutputPixelType

Definition at line 50 of file itkQBallToRgbImageFilter.h.

template<typename TInputImage , typename TOutputImage = itk::Image<itk::RGBAPixel<unsigned char>,3>>
typedef SmartPointer<Self> itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::Pointer

Definition at line 45 of file itkQBallToRgbImageFilter.h.

template<typename TInputImage , typename TOutputImage = itk::Image<itk::RGBAPixel<unsigned char>,3>>
typedef QBallToRgbImageFilter itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::Self

Standard class typedefs.

Definition at line 42 of file itkQBallToRgbImageFilter.h.

template<typename TInputImage , typename TOutputImage = itk::Image<itk::RGBAPixel<unsigned char>,3>>
typedef ImageToImageFilter<TInputImage,TOutputImage> itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::Superclass

Definition at line 44 of file itkQBallToRgbImageFilter.h.


Constructor & Destructor Documentation

template<typename TInputImage , typename TOutputImage = itk::Image<itk::RGBAPixel<unsigned char>,3>>
itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::QBallToRgbImageFilter (  ) [inline, protected]

Definition at line 72 of file itkQBallToRgbImageFilter.h.

{};
template<typename TInputImage , typename TOutputImage = itk::Image<itk::RGBAPixel<unsigned char>,3>>
virtual itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::~QBallToRgbImageFilter (  ) [inline, protected, virtual]

Definition at line 73 of file itkQBallToRgbImageFilter.h.

{};

Member Function Documentation

template<typename TInputImage , typename TOutputImage = itk::Image<itk::RGBAPixel<unsigned char>,3>>
void itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::GenerateData (  ) [inline, protected]

Definition at line 75 of file itkQBallToRgbImageFilter.h.

References __IMG_DAT_ITEM__CEIL_ZERO_ONE__, and itk::OrientationDistributionFunction< TComponent, NOdfDirections >::GetPrincipleDiffusionDirection().

  {

    typename InputImageType::Pointer qballImage = static_cast< InputImageType * >( this->ProcessObject::GetInput(0) );

    typename OutputImageType::Pointer outputImage =
        static_cast< OutputImageType * >(this->ProcessObject::GetOutput(0));

    typename InputImageType::RegionType region = qballImage->GetLargestPossibleRegion();

    outputImage->SetSpacing( qballImage->GetSpacing() );   // Set the image spacing
    outputImage->SetOrigin( qballImage->GetOrigin() );     // Set the image origin
    outputImage->SetDirection( qballImage->GetDirection() );  // Set the image direction
    outputImage->SetRegions( qballImage->GetLargestPossibleRegion());
    outputImage->Allocate();

    typedef ImageRegionConstIterator< InputImageType > QBallImageIteratorType;
    QBallImageIteratorType qballIt(qballImage, qballImage->GetLargestPossibleRegion());

    typedef ImageRegionIterator< OutputImageType > OutputImageIteratorType;
    OutputImageIteratorType outputIt(outputImage, outputImage->GetLargestPossibleRegion());

    qballIt.GoToBegin();
    outputIt.GoToBegin();

    while(!qballIt.IsAtEnd() && !outputIt.IsAtEnd()){

      InputPixelType x = qballIt.Get();
      typedef itk::OrientationDistributionFunction<float,QBALL_ODFSIZE> OdfType;
      OdfType odf(x.GetDataPointer());

      int pd = odf.GetPrincipleDiffusionDirection();
      vnl_vector_fixed<double,3> dir = OdfType::GetDirection(pd);

      const float fa = odf.GetGeneralizedFractionalAnisotropy();
      float r = fabs(dir[0]) * fa;
      float g = fabs(dir[1]) * fa;
      float b = fabs(dir[2]) * fa;
//      float a = (fa-(m_OpacLevel-m_OpacWindow/2.0f))/m_OpacWindow;
      float a = fa;

      __IMG_DAT_ITEM__CEIL_ZERO_ONE__(r);
      __IMG_DAT_ITEM__CEIL_ZERO_ONE__(g);
      __IMG_DAT_ITEM__CEIL_ZERO_ONE__(b);
      __IMG_DAT_ITEM__CEIL_ZERO_ONE__(a);

      OutputPixelType out;
      out.SetRed(   r * 255.0f);
      out.SetGreen( g * 255.0f);
      out.SetBlue(  b * 255.0f);
      out.SetAlpha( a * 255.0f);

      outputIt.Set(out);

      ++qballIt;
      ++outputIt;
    }

  }
template<typename TInputImage , typename TOutputImage = itk::Image<itk::RGBAPixel<unsigned char>,3>>
virtual const char* itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::GetClassName (  ) const [virtual]

Run-time type information (and related methods).

template<typename TInputImage , typename TOutputImage = itk::Image<itk::RGBAPixel<unsigned char>,3>>
static Pointer itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::New (  ) [static]

Method for creation through the object factory.

template<typename TInputImage , typename TOutputImage = itk::Image<itk::RGBAPixel<unsigned char>,3>>
void itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const [inline]

Print internal ivars

Definition at line 61 of file itkQBallToRgbImageFilter.h.

  { this->Superclass::PrintSelf( os, indent ); }

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines