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

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

#include <itkTensorToL2NormImageFilter.h>

List of all members.

Public Types

typedef TensorToL2NormImageFilter Self
typedef ImageToImageFilter
< TInputImage, TOutputImage > 
Superclass
typedef SmartPointer< SelfPointer
typedef SmartPointer< const SelfConstPointer
typedef TInputImage InputImageType
typedef InputImageType::PixelType InputPixelType
typedef TOutputImage OutputImageType
typedef OutputImageType::PixelType OutputPixelType
typedef OutputImageType::RegionType OutputImageRegionType

Public Member Functions

virtual const char * GetClassName () const
 itkStaticConstMacro (ImageDimension, unsigned int, TOutputImage::ImageDimension)

Static Public Member Functions

static Pointer New ()

Protected Member Functions

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

Detailed Description

template<class TInputImage, class TOutputImage>
class itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >

Definition at line 10 of file itkTensorToL2NormImageFilter.h.


Member Typedef Documentation

template<class TInputImage , class TOutputImage >
typedef SmartPointer<const Self> itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::ConstPointer

Definition at line 20 of file itkTensorToL2NormImageFilter.h.

template<class TInputImage , class TOutputImage >
typedef TInputImage itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::InputImageType

Definition at line 27 of file itkTensorToL2NormImageFilter.h.

template<class TInputImage , class TOutputImage >
typedef InputImageType::PixelType itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::InputPixelType

Definition at line 30 of file itkTensorToL2NormImageFilter.h.

template<class TInputImage , class TOutputImage >
typedef OutputImageType::RegionType itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::OutputImageRegionType

Definition at line 33 of file itkTensorToL2NormImageFilter.h.

template<class TInputImage , class TOutputImage >
typedef TOutputImage itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::OutputImageType

Definition at line 31 of file itkTensorToL2NormImageFilter.h.

template<class TInputImage , class TOutputImage >
typedef OutputImageType::PixelType itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::OutputPixelType

Definition at line 32 of file itkTensorToL2NormImageFilter.h.

template<class TInputImage , class TOutputImage >
typedef SmartPointer<Self> itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::Pointer

Definition at line 19 of file itkTensorToL2NormImageFilter.h.

template<class TInputImage , class TOutputImage >
typedef TensorToL2NormImageFilter itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::Self

Definition at line 16 of file itkTensorToL2NormImageFilter.h.

template<class TInputImage , class TOutputImage >
typedef ImageToImageFilter<TInputImage, TOutputImage> itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::Superclass

Definition at line 17 of file itkTensorToL2NormImageFilter.h.


Constructor & Destructor Documentation

template<class TInputImage , class TOutputImage >
itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::TensorToL2NormImageFilter (  ) [inline, protected]

Definition at line 36 of file itkTensorToL2NormImageFilter.h.

{};
template<class TInputImage , class TOutputImage >
itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::~TensorToL2NormImageFilter (  ) [inline, protected]

Definition at line 37 of file itkTensorToL2NormImageFilter.h.

{};

Member Function Documentation

template<class TInputImage , class TOutputImage >
virtual const char* itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::GetClassName (  ) const [virtual]
template<class TInputImage , class TOutputImage >
itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::itkStaticConstMacro ( ImageDimension  ,
unsigned  int,
TOutputImage::ImageDimension   
)
template<class TInputImage , class TOutputImage >
static Pointer itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::New (  ) [static]
template<class TInputImage , class TOutputImage >
void itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const [inline, protected]

Definition at line 39 of file itkTensorToL2NormImageFilter.h.

    {
      Superclass::PrintSelf (os, indent);      
    }
template<class TInputImage , class TOutputImage >
void itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::ThreadedGenerateData ( const OutputImageRegionType outputRegionForThread,
int  threadId 
) [protected]

Definition at line 31 of file itkTensorToL2NormImageFilter.txx.

References QuadProgPP::sum().

  {
    typedef ImageRegionIterator<OutputImageType>      IteratorOutputType;
    typedef ImageRegionConstIterator<InputImageType>  IteratorInputType;

    unsigned long numPixels = outputRegionForThread.GetNumberOfPixels();
    unsigned long step = numPixels/100;
    unsigned long progress = 0;
        
    IteratorOutputType itOut(this->GetOutput(), outputRegionForThread);
    IteratorInputType  itIn(this->GetInput(), outputRegionForThread);

    if( threadId==0 )
      this->UpdateProgress (0.0);
    
    while(!itOut.IsAtEnd())
    {
      if( this->GetAbortGenerateData() )
        throw itk::ProcessAborted(__FILE__,__LINE__);
      
      
      OutputPixelType out = static_cast<OutputPixelType>( 0.0 ); // be careful, overload in MedINRIA
      
      InputPixelType T = itIn.Get();

      if ( !(T[0]==0 && T[1]==0 && T[2]==0 && T[3]==0 && T[4]==0 && T[5]==0) )
      {
        double sum = T[0]*T[0] + T[3]*T[3] + T[5]*T[5]
          + T[1]*T[2]*2.0 + T[2]*T[4]*2.0 + T[1]*T[4]*2.0;
        out = static_cast<OutputPixelType>( vcl_sqrt( sum ));
      }
              
      if( threadId==0 && step>0)
      {        
        if( (progress%step)==0 )
          this->UpdateProgress ( double(progress)/double(numPixels) );
      }

      
      itOut.Set (out);
      ++progress;
      ++itOut;
      ++itIn;
      
    }

    if( threadId==0 )
      this->UpdateProgress (1.0);
    
  }

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