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

itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections > Class Template Reference

#include <itkDiffusionQballGeneralizedFaImageFilter.h>

List of all members.

Public Types

enum  GfaComputationMethod {
  GFA_STANDARD, GFA_QUANTILES_HIGH_LOW, GFA_QUANTILE_HIGH, GFA_MAX_ODF_VALUE,
  GFA_DECONVOLUTION_COEFFS, GFA_MIN_MAX_NORMALIZED_STANDARD, GFA_NORMALIZED_ENTROPY, GFA_NEMATIC_ORDER_PARAMETER,
  GFA_QUANTILE_LOW, GFA_MIN_ODF_VALUE, GFA_QUANTILES_LOW_HIGH, GFA_STD_BY_MAX,
  GFA_PRINCIPLE_CURVATURE, GFA_GENERALIZED_GFA
}
typedef
DiffusionQballGeneralizedFaImageFilter 
Self
typedef SmartPointer< SelfPointer
typedef SmartPointer< const SelfConstPointer
typedef ImageToImageFilter
< Image< Vector< TOdfPixelType,
NrOdfDirections >, 3 >, Image
< TGfaPixelType, 3 > > 
Superclass
typedef TOdfPixelType OdfComponentType
typedef TGfaPixelType DirectionPixelType
typedef Superclass::InputImageType InputImageType
typedef Superclass::OutputImageType OutputImageType
typedef
Superclass::OutputImageRegionType 
OutputImageRegionType

Public Member Functions

virtual const char * GetClassName () const
 itkStaticConstMacro (NOdfDirections, int, NrOdfDirections)
void SetOdfImage (const InputImageType *image)
virtual GfaComputationMethod GetComputationMethod ()
virtual void SetComputationMethod (GfaComputationMethod _arg)
virtual double GetParam1 ()
virtual void SetParam1 (double _arg)
virtual double GetParam2 ()
virtual void SetParam2 (double _arg)

Static Public Member Functions

static Pointer New ()

Protected Member Functions

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

Protected Attributes

GfaComputationMethod m_ComputationMethod
double m_Param1
double m_Param2

Detailed Description

template<class TOdfPixelType, class TGfaPixelType, int NrOdfDirections>
class itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections >

Definition at line 36 of file itkDiffusionQballGeneralizedFaImageFilter.h.


Member Typedef Documentation

template<class TOdfPixelType , class TGfaPixelType , int NrOdfDirections>
typedef SmartPointer<const Self> itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections >::ConstPointer

Definition at line 63 of file itkDiffusionQballGeneralizedFaImageFilter.h.

template<class TOdfPixelType , class TGfaPixelType , int NrOdfDirections>
typedef TGfaPixelType itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections >::DirectionPixelType

Definition at line 77 of file itkDiffusionQballGeneralizedFaImageFilter.h.

template<class TOdfPixelType , class TGfaPixelType , int NrOdfDirections>
typedef Superclass::InputImageType itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections >::InputImageType

Definition at line 79 of file itkDiffusionQballGeneralizedFaImageFilter.h.

template<class TOdfPixelType , class TGfaPixelType , int NrOdfDirections>
typedef TOdfPixelType itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections >::OdfComponentType

Definition at line 73 of file itkDiffusionQballGeneralizedFaImageFilter.h.

template<class TOdfPixelType , class TGfaPixelType , int NrOdfDirections>
typedef Superclass::OutputImageRegionType itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections >::OutputImageRegionType

Definition at line 84 of file itkDiffusionQballGeneralizedFaImageFilter.h.

template<class TOdfPixelType , class TGfaPixelType , int NrOdfDirections>
typedef Superclass::OutputImageType itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections >::OutputImageType

Definition at line 81 of file itkDiffusionQballGeneralizedFaImageFilter.h.

template<class TOdfPixelType , class TGfaPixelType , int NrOdfDirections>
typedef SmartPointer<Self> itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections >::Pointer

Definition at line 62 of file itkDiffusionQballGeneralizedFaImageFilter.h.

template<class TOdfPixelType , class TGfaPixelType , int NrOdfDirections>
typedef DiffusionQballGeneralizedFaImageFilter itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections >::Self

Definition at line 61 of file itkDiffusionQballGeneralizedFaImageFilter.h.

template<class TOdfPixelType , class TGfaPixelType , int NrOdfDirections>
typedef ImageToImageFilter< Image< Vector< TOdfPixelType, NrOdfDirections >, 3 >, Image< TGfaPixelType, 3 > > itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections >::Superclass

Definition at line 66 of file itkDiffusionQballGeneralizedFaImageFilter.h.


Member Enumeration Documentation

template<class TOdfPixelType , class TGfaPixelType , int NrOdfDirections>
enum itk::DiffusionQballGeneralizedFaImageFilter::GfaComputationMethod
Enumerator:
GFA_STANDARD 
GFA_QUANTILES_HIGH_LOW 
GFA_QUANTILE_HIGH 
GFA_MAX_ODF_VALUE 
GFA_DECONVOLUTION_COEFFS 
GFA_MIN_MAX_NORMALIZED_STANDARD 
GFA_NORMALIZED_ENTROPY 
GFA_NEMATIC_ORDER_PARAMETER 
GFA_QUANTILE_LOW 
GFA_MIN_ODF_VALUE 
GFA_QUANTILES_LOW_HIGH 
GFA_STD_BY_MAX 
GFA_PRINCIPLE_CURVATURE 
GFA_GENERALIZED_GFA 

Definition at line 43 of file itkDiffusionQballGeneralizedFaImageFilter.h.


Constructor & Destructor Documentation

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

Definition at line 26 of file itkDiffusionQballGeneralizedFaImageFilter.txx.

                                             :
        m_ComputationMethod(GFA_STANDARD)
  {
    // At least 1 inputs is necessary for a vector image.
    // For images added one at a time we need at least six
    this->SetNumberOfRequiredInputs( 1 );
  }
template<class TOdfPixelType , class TGfaPixelType , int NrOdfDirections>
itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections >::~DiffusionQballGeneralizedFaImageFilter (  ) [inline, protected]

Definition at line 101 of file itkDiffusionQballGeneralizedFaImageFilter.h.

{};

Member Function Documentation

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

Definition at line 39 of file itkDiffusionQballGeneralizedFaImageFilter.txx.

  {
  }
template<class TOdfPixelType , class TGfaPixelType , int NrOdfDirections>
virtual const char* itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections >::GetClassName (  ) const [virtual]

Runtime information support.

template<class TOdfPixelType , class TGfaPixelType , int NrOdfDirections>
virtual GfaComputationMethod itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections >::GetComputationMethod (  ) [virtual]
template<class TOdfPixelType , class TGfaPixelType , int NrOdfDirections>
virtual double itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections >::GetParam1 (  ) [virtual]
template<class TOdfPixelType , class TGfaPixelType , int NrOdfDirections>
virtual double itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections >::GetParam2 (  ) [virtual]
template<class TOdfPixelType , class TGfaPixelType , int NrOdfDirections>
itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections >::itkStaticConstMacro ( NOdfDirections  ,
int  ,
NrOdfDirections   
)
template<class TOdfPixelType , class TGfaPixelType , int NrOdfDirections>
static Pointer itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections >::New (  ) [static]

Method for creation through the object factory.

template<class TOdfPixelType , class TGfaPixelType , int NrOdfDirections>
void itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const [protected]

Definition at line 198 of file itkDiffusionQballGeneralizedFaImageFilter.txx.

  {
    Superclass::PrintSelf(os,indent);
  }
template<class TOdfPixelType , class TGfaPixelType , int NrOdfDirections>
virtual void itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections >::SetComputationMethod ( GfaComputationMethod  _arg ) [virtual]
template<class TOdfPixelType , class TGfaPixelType , int NrOdfDirections>
void itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections >::SetOdfImage ( const InputImageType image )
template<class TOdfPixelType , class TGfaPixelType , int NrOdfDirections>
virtual void itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections >::SetParam1 ( double  _arg ) [virtual]
template<class TOdfPixelType , class TGfaPixelType , int NrOdfDirections>
virtual void itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections >::SetParam2 ( double  _arg ) [virtual]
template<class TOdfPixelType , class TGfaPixelType , int NrOdfDirections>
void itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections >::ThreadedGenerateData ( const OutputImageRegionType outputRegionForThread,
int   
) [protected]

Definition at line 48 of file itkDiffusionQballGeneralizedFaImageFilter.txx.

References QuadProgPP::sort().

  {
    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();
    while( !git.IsAtEnd() )
    {
      OdfVectorType b = git.Get();
      TGfaPixelType outval = -1;

      switch( m_ComputationMethod )
      {
      case GFA_STANDARD:
        {
          OdfType odf = b.GetDataPointer();
          outval = odf.GetGeneralizedFractionalAnisotropy();
          break;
        }
      case GFA_QUANTILES_HIGH_LOW:
        {
          vnl_vector_fixed<TOdfPixelType,NrOdfDirections> sorted;
          for(int i=0; i<NrOdfDirections; i++)
          {
            sorted[i] = b[i];
          }
          std::sort( sorted.begin(), sorted.end() );
          double q60 = sorted[floor(0.6*(double)NrOdfDirections+0.5)];
          double q95 = sorted[floor(0.95*(double)NrOdfDirections+0.5)];
          outval = q95/q60 - 1.0;
          break;
        }
      case GFA_QUANTILE_HIGH:
        {
          vnl_vector_fixed<TOdfPixelType,NrOdfDirections> sorted;
          for(int i=0; i<NrOdfDirections; i++)
          {
            sorted[i] = b[i];
          }
          std::sort( sorted.begin(), sorted.end() );
          //double q40 = sorted[floor(0.4*(double)NrOdfDirections+0.5)];
          double q95 = sorted[floor(0.95*(double)NrOdfDirections+0.5)];
          outval = q95;
          break;
        }
      case GFA_MAX_ODF_VALUE:
        {
          outval = b.GetVnlVector().max_value();
          break;
        }
      case GFA_DECONVOLUTION_COEFFS:
        {
          break;
        }
      case GFA_MIN_MAX_NORMALIZED_STANDARD:
        {
          OdfType odf = b.GetDataPointer();
          odf = odf.MinMaxNormalize();
          outval = odf.GetGeneralizedFractionalAnisotropy();
          break;
        }  
      case GFA_NORMALIZED_ENTROPY:
        {
          OdfType odf = b.GetDataPointer();
          outval = odf.GetNormalizedEntropy();
          break;
        }  
      case GFA_NEMATIC_ORDER_PARAMETER:
        {
          OdfType odf = b.GetDataPointer();
          outval = odf.GetNematicOrderParameter();
          break;
        }  
      case GFA_QUANTILE_LOW:
        {
          vnl_vector_fixed<TOdfPixelType,NrOdfDirections> sorted;
          for(int i=0; i<NrOdfDirections; i++)
          {
            sorted[i] = b[i];
          }
          std::sort( sorted.begin(), sorted.end() );
          //double q40 = sorted[floor(0.4*(double)NrOdfDirections+0.5)];
          double q05 = sorted[floor(0.05*(double)NrOdfDirections+0.5)];
          outval = q05;
          break;
        }
      case GFA_MIN_ODF_VALUE:
        {
          outval = b.GetVnlVector().min_value();
          break;
        }
      case GFA_QUANTILES_LOW_HIGH:
        {
          vnl_vector_fixed<TOdfPixelType,NrOdfDirections> sorted;
          for(int i=0; i<NrOdfDirections; i++)
          {
            sorted[i] = b[i];
          }
          std::sort( sorted.begin(), sorted.end() );
          double q05 = sorted[floor(0.05*(double)NrOdfDirections+0.5)];
          double q40 = sorted[floor(0.4*(double)NrOdfDirections+0.5)];
          outval = q40/q05 - 1.0;
          break;
        }
      case GFA_STD_BY_MAX:
        {
          OdfType odf = b.GetDataPointer();
          outval = odf.GetStdDevByMaxValue();
          break;
        } 
      case GFA_PRINCIPLE_CURVATURE:
        {
          OdfType odf = b.GetDataPointer();
          outval = odf.GetPrincipleCurvature(m_Param1, m_Param2, 0);
          break;
        } 
      case GFA_GENERALIZED_GFA:
        {
          OdfType odf = b.GetDataPointer();
          outval = odf.GetGeneralizedGFA(m_Param1, m_Param2);
          break;
        } 
      }
      
      oit.Set( outval );
      
      ++oit;
      ++git; // Gradient  image iterator
    }

    std::cout << "One Thread finished calculation" << std::endl;
  }

Member Data Documentation

template<class TOdfPixelType , class TGfaPixelType , int NrOdfDirections>
GfaComputationMethod itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections >::m_ComputationMethod [protected]

Definition at line 108 of file itkDiffusionQballGeneralizedFaImageFilter.h.

template<class TOdfPixelType , class TGfaPixelType , int NrOdfDirections>
double itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections >::m_Param1 [protected]

Definition at line 110 of file itkDiffusionQballGeneralizedFaImageFilter.h.

template<class TOdfPixelType , class TGfaPixelType , int NrOdfDirections>
double itk::DiffusionQballGeneralizedFaImageFilter< TOdfPixelType, TGfaPixelType, NrOdfDirections >::m_Param2 [protected]

Definition at line 111 of file itkDiffusionQballGeneralizedFaImageFilter.h.


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