#include <itkTensorToL2NormImageFilter.h>
Public Types | |
typedef TensorToL2NormImageFilter | Self |
typedef ImageToImageFilter < TInputImage, TOutputImage > | Superclass |
typedef SmartPointer< Self > | Pointer |
typedef SmartPointer< const Self > | ConstPointer |
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) |
Definition at line 10 of file itkTensorToL2NormImageFilter.h.
typedef SmartPointer<const Self> itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::ConstPointer |
Definition at line 20 of file itkTensorToL2NormImageFilter.h.
typedef TInputImage itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::InputImageType |
Definition at line 27 of file itkTensorToL2NormImageFilter.h.
typedef InputImageType::PixelType itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::InputPixelType |
Definition at line 30 of file itkTensorToL2NormImageFilter.h.
typedef OutputImageType::RegionType itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::OutputImageRegionType |
Definition at line 33 of file itkTensorToL2NormImageFilter.h.
typedef TOutputImage itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::OutputImageType |
Definition at line 31 of file itkTensorToL2NormImageFilter.h.
typedef OutputImageType::PixelType itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::OutputPixelType |
Definition at line 32 of file itkTensorToL2NormImageFilter.h.
typedef SmartPointer<Self> itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::Pointer |
Definition at line 19 of file itkTensorToL2NormImageFilter.h.
typedef TensorToL2NormImageFilter itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::Self |
Definition at line 16 of file itkTensorToL2NormImageFilter.h.
typedef ImageToImageFilter<TInputImage, TOutputImage> itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::Superclass |
Definition at line 17 of file itkTensorToL2NormImageFilter.h.
itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::TensorToL2NormImageFilter | ( | ) | [inline, protected] |
Definition at line 36 of file itkTensorToL2NormImageFilter.h.
{};
itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::~TensorToL2NormImageFilter | ( | ) | [inline, protected] |
Definition at line 37 of file itkTensorToL2NormImageFilter.h.
{};
virtual const char* itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::GetClassName | ( | ) | const [virtual] |
itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::itkStaticConstMacro | ( | ImageDimension | , |
unsigned | int, | ||
TOutputImage::ImageDimension | |||
) |
static Pointer itk::TensorToL2NormImageFilter< TInputImage, TOutputImage >::New | ( | ) | [static] |
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); }
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); }