#include <itkQBallToRgbImageFilter.h>
Public Types | |
typedef QBallToRgbImageFilter | Self |
typedef ImageToImageFilter < TInputImage, TOutputImage > | Superclass |
typedef SmartPointer< Self > | Pointer |
typedef SmartPointer< const Self > | ConstPointer |
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 () |
Definition at line 37 of file itkQBallToRgbImageFilter.h.
typedef SmartPointer<const Self> itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::ConstPointer |
Definition at line 46 of file itkQBallToRgbImageFilter.h.
typedef Superclass::InputImageType itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::InputImageType |
Definition at line 48 of file itkQBallToRgbImageFilter.h.
typedef TInputImage::PixelType itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::InputPixelType |
Definition at line 51 of file itkQBallToRgbImageFilter.h.
typedef InputPixelType::ValueType itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::InputValueType |
Definition at line 52 of file itkQBallToRgbImageFilter.h.
typedef Superclass::OutputImageType itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::OutputImageType |
Definition at line 49 of file itkQBallToRgbImageFilter.h.
typedef OutputImageType::PixelType itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::OutputPixelType |
Definition at line 50 of file itkQBallToRgbImageFilter.h.
typedef SmartPointer<Self> itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::Pointer |
Definition at line 45 of file itkQBallToRgbImageFilter.h.
typedef QBallToRgbImageFilter itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::Self |
Standard class typedefs.
Definition at line 42 of file itkQBallToRgbImageFilter.h.
typedef ImageToImageFilter<TInputImage,TOutputImage> itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::Superclass |
Definition at line 44 of file itkQBallToRgbImageFilter.h.
itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::QBallToRgbImageFilter | ( | ) | [inline, protected] |
Definition at line 72 of file itkQBallToRgbImageFilter.h.
{};
virtual itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::~QBallToRgbImageFilter | ( | ) | [inline, protected, virtual] |
Definition at line 73 of file itkQBallToRgbImageFilter.h.
{};
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; } }
virtual const char* itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::GetClassName | ( | ) | const [virtual] |
Run-time type information (and related methods).
static Pointer itk::QBallToRgbImageFilter< TInputImage, TOutputImage >::New | ( | ) | [static] |
Method for creation through the object factory.
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 ); }