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

itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections > Class Template Reference

#include <itkDiffusionQballPrepareVisualizationImageFilter.h>

Collaboration diagram for itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >:
Collaboration graph
[legend]

List of all members.

Public Types

enum  NormalizationMethods {
  PV_NONE, PV_MAX, PV_MIN_MAX, PV_GLOBAL_MAX,
  PV_MIN_MAX_INVERT
}
typedef
DiffusionQballPrepareVisualizationImageFilter 
Self
typedef SmartPointer< SelfPointer
typedef SmartPointer< const SelfConstPointer
typedef ImageToImageFilter
< Image< Vector< TOdfPixelType,
NrOdfDirections >, 3 >, Image
< Vector< TOdfPixelType,
NrOdfDirections >, 3 > > 
Superclass
typedef
DiffusionQballGeneralizedFaImageFilter
< TOdfPixelType, TOdfPixelType,
NrOdfDirections > 
GfaFilterType
typedef
GfaFilterType::OutputImageType 
GfaImageType
typedef
GfaFilterType::GfaComputationMethod 
GfaComputationMethod
typedef TOdfPixelType OdfComponentType
typedef Superclass::InputImageType InputImageType
typedef Superclass::OutputImageType OutputImageType
typedef
Superclass::OutputImageRegionType 
OutputImageRegionType

Public Member Functions

virtual const char * GetClassName () const
 itkStaticConstMacro (NOdfDirections, int, NrOdfDirections)
virtual void SetThreshold (OdfComponentType _arg)
virtual OdfComponentType GetThreshold ()
virtual void SetNormalizationMethod (NormalizationMethods _arg)
virtual NormalizationMethods GetNormalizationMethod ()
virtual void SetScaleByGfaType (GfaComputationMethod _arg)
virtual GfaComputationMethod GetScaleByGfaType ()
virtual void SetDoScaleGfa (bool _arg)
virtual bool GetDoScaleGfa ()
virtual void SetGfaParam1 (double _arg)
virtual double GetGfaParam1 ()
virtual void SetGfaParam2 (double _arg)
virtual double GetGfaParam2 ()

Static Public Member Functions

static Pointer New ()

Protected Member Functions

 DiffusionQballPrepareVisualizationImageFilter ()
 ~DiffusionQballPrepareVisualizationImageFilter ()
void PrintSelf (std::ostream &os, Indent indent) const
void BeforeThreadedGenerateData ()
void ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, int)

Detailed Description

template<class TOdfPixelType, int NrOdfDirections>
class itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >

Definition at line 36 of file itkDiffusionQballPrepareVisualizationImageFilter.h.


Member Typedef Documentation

template<class TOdfPixelType , int NrOdfDirections>
typedef SmartPointer<const Self> itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::ConstPointer
template<class TOdfPixelType , int NrOdfDirections>
typedef GfaFilterType::GfaComputationMethod itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::GfaComputationMethod
template<class TOdfPixelType , int NrOdfDirections>
typedef DiffusionQballGeneralizedFaImageFilter<TOdfPixelType,TOdfPixelType,NrOdfDirections> itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::GfaFilterType
template<class TOdfPixelType , int NrOdfDirections>
typedef GfaFilterType::OutputImageType itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::GfaImageType
template<class TOdfPixelType , int NrOdfDirections>
typedef Superclass::InputImageType itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::InputImageType
template<class TOdfPixelType , int NrOdfDirections>
typedef TOdfPixelType itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::OdfComponentType
template<class TOdfPixelType , int NrOdfDirections>
typedef Superclass::OutputImageRegionType itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::OutputImageRegionType
template<class TOdfPixelType , int NrOdfDirections>
typedef Superclass::OutputImageType itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::OutputImageType
template<class TOdfPixelType , int NrOdfDirections>
typedef SmartPointer<Self> itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::Pointer
template<class TOdfPixelType , int NrOdfDirections>
typedef DiffusionQballPrepareVisualizationImageFilter itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::Self
template<class TOdfPixelType , int NrOdfDirections>
typedef ImageToImageFilter< Image< Vector< TOdfPixelType, NrOdfDirections >, 3 >, Image< Vector< TOdfPixelType, NrOdfDirections >, 3 > > itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::Superclass

Member Enumeration Documentation

template<class TOdfPixelType , int NrOdfDirections>
enum itk::DiffusionQballPrepareVisualizationImageFilter::NormalizationMethods
Enumerator:
PV_NONE 
PV_MAX 
PV_MIN_MAX 
PV_GLOBAL_MAX 
PV_MIN_MAX_INVERT 

Definition at line 43 of file itkDiffusionQballPrepareVisualizationImageFilter.h.


Constructor & Destructor Documentation

template<class TOdfPixelType , int NrOdfDirections>
itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::DiffusionQballPrepareVisualizationImageFilter (  ) [protected]

Definition at line 16 of file itkDiffusionQballPrepareVisualizationImageFilter.cpp.

              {

  //#define QBALL_RECON_PI       3.14159265358979323846

  template< class TOdfPixelType, int NrOdfDirections>
    DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections>
    ::DiffusionQballPrepareVisualizationImageFilter() :
  m_Threshold(0),
    m_ScaleByGfaType(GfaFilterType::GFA_STANDARD),
    m_DoScaleGfa(false),
template<class TOdfPixelType , int NrOdfDirections>
itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::~DiffusionQballPrepareVisualizationImageFilter (  ) [inline, protected]

Member Function Documentation

template<class TOdfPixelType , int NrOdfDirections>
void itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::BeforeThreadedGenerateData (  ) [protected]

Definition at line 32 of file itkDiffusionQballPrepareVisualizationImageFilter.cpp.

  {
    if( m_NormalizationMethod == PV_GLOBAL_MAX )
    {
      typename InputImageType::Pointer inputImagePointer = NULL;
      inputImagePointer = static_cast< InputImageType * >( 
        this->ProcessObject::GetInput(0) );

      typename GfaFilterType::Pointer filter = GfaFilterType::New();
      filter->SetInput(inputImagePointer);
      filter->SetNumberOfThreads(4);
      filter->SetComputationMethod(GfaFilterType::GFA_MAX_ODF_VALUE);
      filter->Update();

      typedef typename itk::MinimumMaximumImageCalculator< typename GfaFilterType::OutputImageType > 
        MaxFilterType;
      typename MaxFilterType::Pointer maxFilter = MaxFilterType::New();
      maxFilter->SetImage(filter->GetOutput());
      maxFilter->ComputeMaximum();

      m_GlobalInputMaximum = maxFilter->GetMaximum();
    }

    //if(m_DoScaleGfa)
    {
      typename InputImageType::Pointer inputImagePointer = NULL;
      inputImagePointer = static_cast< InputImageType * >( 
        this->ProcessObject::GetInput(0) );

      typename GfaFilterType::Pointer filter = GfaFilterType::New();
      filter->SetInput(inputImagePointer);
      filter->SetNumberOfThreads(4);
template<class TOdfPixelType , int NrOdfDirections>
virtual const char* itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::GetClassName (  ) const [virtual]

Runtime information support.

template<class TOdfPixelType , int NrOdfDirections>
virtual bool itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::GetDoScaleGfa (  ) [virtual]
template<class TOdfPixelType , int NrOdfDirections>
virtual double itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::GetGfaParam1 (  ) [virtual]
template<class TOdfPixelType , int NrOdfDirections>
virtual double itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::GetGfaParam2 (  ) [virtual]
template<class TOdfPixelType , int NrOdfDirections>
virtual NormalizationMethods itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::GetNormalizationMethod (  ) [virtual]
template<class TOdfPixelType , int NrOdfDirections>
virtual GfaComputationMethod itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::GetScaleByGfaType (  ) [virtual]
template<class TOdfPixelType , int NrOdfDirections>
virtual OdfComponentType itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::GetThreshold (  ) [virtual]
template<class TOdfPixelType , int NrOdfDirections>
itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::itkStaticConstMacro ( NOdfDirections  ,
int  ,
NrOdfDirections   
)
template<class TOdfPixelType , int NrOdfDirections>
static Pointer itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::New (  ) [static]

Method for creation through the object factory.

template<class TOdfPixelType , int NrOdfDirections>
void itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const [protected]
template<class TOdfPixelType , int NrOdfDirections>
virtual void itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::SetDoScaleGfa ( bool  _arg ) [virtual]
template<class TOdfPixelType , int NrOdfDirections>
virtual void itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::SetGfaParam1 ( double  _arg ) [virtual]
template<class TOdfPixelType , int NrOdfDirections>
virtual void itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::SetGfaParam2 ( double  _arg ) [virtual]
template<class TOdfPixelType , int NrOdfDirections>
virtual void itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::SetNormalizationMethod ( NormalizationMethods  _arg ) [virtual]
template<class TOdfPixelType , int NrOdfDirections>
virtual void itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::SetScaleByGfaType ( GfaComputationMethod  _arg ) [virtual]
template<class TOdfPixelType , int NrOdfDirections>
virtual void itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::SetThreshold ( OdfComponentType  _arg ) [virtual]
template<class TOdfPixelType , int NrOdfDirections>
void itk::DiffusionQballPrepareVisualizationImageFilter< TOdfPixelType, NrOdfDirections >::ThreadedGenerateData ( const OutputImageRegionType outputRegionForThread,
int   
) [protected]

Definition at line 76 of file itkDiffusionQballPrepareVisualizationImageFilter.cpp.

  {
    typename OutputImageType::Pointer outputImage = 
      static_cast< OutputImageType * >(this->ProcessObject::GetOutput(0));
    ImageRegionIterator< OutputImageType > oit(outputImage, outputRegionForThread);
    oit.GoToBegin();

    typedef itk::OrientationDistributionFunction<TOdfPixelType,NrOdfDirections> OdfType;
    typedef ImageRegionConstIterator< InputImageType > InputIteratorType;
    typedef typename InputImageType::PixelType         OdfVectorType;
    typename InputImageType::Pointer inputImagePointer = NULL;
    inputImagePointer = static_cast< InputImageType * >( 
      this->ProcessObject::GetInput(0) );
    InputIteratorType git(inputImagePointer, outputRegionForThread );
    git.GoToBegin();

    typedef ImageRegionConstIterator< GfaImageType > GfaIteratorType;
    GfaIteratorType gfaIt(m_GfaImage, outputRegionForThread);
    
    while( !git.IsAtEnd() )
    {
      OdfVectorType b = git.Get();
      OdfType odf = b.GetDataPointer();
 
      switch( m_NormalizationMethod )
      {
      case PV_NONE:
        {
          break;
        }
      case PV_MAX:
        {
          odf = odf.MaxNormalize();
          break;
        }
      case PV_MIN_MAX:
        {
          odf = odf.MinMaxNormalize();
          break;
        }
      case PV_GLOBAL_MAX:
        {
          odf *= 1.0/m_GlobalInputMaximum;
          break;
        }
      case PV_MIN_MAX_INVERT:
        {
          odf = odf.MinMaxNormalize();
          for(int i=0; i<NrOdfDirections; i++)
          {
            odf[i] = 1.0 - odf[i];
          }
          break;
        }
      }
        
      if(m_DoScaleGfa)
      {
        odf *= gfaIt.Get();
        ++gfaIt;
      }

      odf *= 0.5;

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