Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
itk::TractsToVectorImageFilter< PixelType > Class Template Reference

Extracts the voxel-wise main directions of the input fiber bundle. More...

#include <itkTractsToVectorImageFilter.h>

Inheritance diagram for itk::TractsToVectorImageFilter< PixelType >:
Collaboration diagram for itk::TractsToVectorImageFilter< PixelType >:

Public Types

typedef TractsToVectorImageFilter Self
 
typedef ProcessObject Superclass
 
typedef SmartPointer< SelfPointer
 
typedef SmartPointer< const SelfConstPointer
 
typedef itk::Vector< float, 3 > OutputVectorType
 
typedef itk::Image< OutputVectorType, 3 > OutputImageType
 
typedef std::vector< OutputImageType::Pointer > OutputImageContainerType
 
typedef vnl_vector_fixed< double, 3 > DirectionType
 
typedef VectorContainer< unsigned int, DirectionTypeDirectionContainerType
 
typedef VectorContainer< unsigned int, DirectionContainerType::Pointer > ContainerType
 
typedef Image< Vector< float, 3 >, 3 > ItkDirectionImageType
 
typedef VectorContainer< unsigned int, ItkDirectionImageType::PointerDirectionImageContainerType
 
typedef itk::Image< unsigned char, 3 > ItkUcharImgType
 
typedef itk::Image< double, 3 > ItkDoubleImgType
 
- Public Types inherited from mitk::ImageSource< VectorImage< float, 3 > >
typedef ImageSource Self
 
typedef BaseDataSource Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef mitk::Image OutputImageType
 Some convenient typedefs. More...
 
typedef OutputImageType OutputType
 
typedef OutputImageType::Pointer OutputImagePointer
 
typedef SlicedData::RegionType OutputImageRegionType
 

Public Member Functions

Pointer Clone () const
 
virtual const char * GetClassName () const
 
virtual void SetSizeThreshold (float _arg)
 
virtual float GetSizeThreshold ()
 
virtual void SetAngularThreshold (float _arg)
 cluster directions that are closer together than the specified threshold More...
 
virtual float GetAngularThreshold ()
 cluster directions that are closer together than the specified threshold More...
 
virtual void SetNormalizeVectors (bool _arg)
 Normalize vectors to length 1. More...
 
virtual bool GetNormalizeVectors ()
 Normalize vectors to length 1. More...
 
virtual void SetUseWorkingCopy (bool _arg)
 Do not modify input fiber bundle. Use a copy. More...
 
virtual bool GetUseWorkingCopy ()
 Do not modify input fiber bundle. Use a copy. More...
 
virtual void SetMaxNumDirections (unsigned long _arg)
 If more directions are extracted, only the largest are kept. More...
 
virtual unsigned long GetMaxNumDirections ()
 If more directions are extracted, only the largest are kept. More...
 
virtual void SetMaskImage (ItkUcharImgType::Pointer _arg)
 only process voxels inside mask More...
 
virtual void SetFiberBundle (FiberBundle::Pointer _arg)
 input fiber bundle More...
 
virtual ContainerType::Pointer GetClusteredDirectionsContainer ()
 output directions More...
 
virtual ItkUcharImgType::Pointer GetNumDirectionsImage ()
 number of directions per voxel More...
 
virtual FiberBundle::Pointer GetOutputFiberBundle ()
 vector field for visualization purposes More...
 
virtual DirectionImageContainerType::Pointer GetDirectionImageContainer ()
 output directions More...
 
virtual void SetCreateDirectionImages (bool _arg)
 
void GenerateData () override
 A version of GenerateData() specific for image processing filters. More...
 
- Public Member Functions inherited from mitk::ImageSource< VectorImage< float, 3 > >
virtual std::vector< std::string > GetClassHierarchy () const override
 
Pointer Clone () const
 
OutputTypeGetOutput ()
 Get the output data of this image source object. More...
 
const OutputTypeGetOutput () const
 
OutputTypeGetOutput (DataObjectPointerArraySizeType idx)
 
const OutputTypeGetOutput (DataObjectPointerArraySizeType idx) const
 
virtual itk::DataObject::Pointer MakeOutput (DataObjectPointerArraySizeType idx) override
 Make a DataObject of the correct type to used as the specified output. More...
 
virtual itk::DataObject::Pointer MakeOutput (const DataObjectIdentifierType &name) override
 
virtual vtkImageData * GetVtkImageData ()
 
virtual const vtkImageData * GetVtkImageData () const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from mitk::ImageSource< VectorImage< float, 3 > >
static const char * GetStaticNameOfClass ()
 
static Pointer New ()
 Method for creation through the object factory. More...
 

Protected Member Functions

DirectionContainerType::Pointer FastClustering (DirectionContainerType::Pointer inDirs, std::vector< double > lengths)
 cluster fiber directions More...
 
vnl_vector_fixed< double, 3 > GetVnlVector (double point[3])
 
itk::Point< double, 3 > GetItkPoint (double point[3])
 
 TractsToVectorImageFilter ()
 
virtual ~TractsToVectorImageFilter ()
 
- Protected Member Functions inherited from mitk::ImageSource< VectorImage< float, 3 > >
 ImageSource ()
 
virtual ~ImageSource ()
 
virtual void ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, itk::ThreadIdType threadId)
 If an imaging filter can be implemented as a multithreaded algorithm, the filter will provide an implementation of ThreadedGenerateData(). More...
 
virtual void PrepareOutputs () override
 This method is intentionally left blank. More...
 
virtual void AllocateOutputs ()
 The GenerateData method normally allocates the buffers for all of the outputs of a filter. More...
 
virtual void BeforeThreadedGenerateData ()
 If an imaging filter needs to perform processing after the buffer has been allocated but before threads are spawned, the filter can can provide an implementation for BeforeThreadedGenerateData(). More...
 
virtual void AfterThreadedGenerateData ()
 If an imaging filter needs to perform processing after all processing threads have completed, the filter can can provide an implementation for AfterThreadedGenerateData(). More...
 
virtual unsigned int SplitRequestedRegion (unsigned int i, unsigned int num, OutputImageRegionType &splitRegion)
 Split the output's RequestedRegion into "num" pieces, returning region "i" as "splitRegion". More...
 

Protected Attributes

FiberBundle::Pointer m_FiberBundle
 input fiber bundle More...
 
float m_AngularThreshold
 cluster directions that are closer together than the specified threshold More...
 
float m_Epsilon
 epsilon for vector equality check More...
 
ItkUcharImgType::Pointer m_MaskImage
 only voxels inside the binary mask are processed More...
 
bool m_NormalizeVectors
 normalize vectors to length 1 More...
 
itk::Vector< float > m_OutImageSpacing
 spacing of output image More...
 
ContainerType::Pointer m_DirectionsContainer
 container for fiber directions More...
 
bool m_UseWorkingCopy
 do not modify input fiber bundle but work on copy More...
 
unsigned long m_MaxNumDirections
 if more directions per voxel are extracted, only the largest are kept More...
 
float m_SizeThreshold
 
bool m_CreateDirectionImages
 
ContainerType::Pointer m_ClusteredDirectionsContainer
 contains direction vectors for each voxel More...
 
ItkUcharImgType::Pointer m_NumDirectionsImage
 shows number of fibers per voxel More...
 
DirectionImageContainerType::Pointer m_DirectionImageContainer
 contains images that contain the output directions More...
 
FiberBundle::Pointer m_OutputFiberBundle
 vector field for visualization purposes More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from mitk::ImageSource< VectorImage< float, 3 > >
static ITK_THREAD_RETURN_TYPE ThreaderCallback (void *arg)
 Static function used as a "callback" by the MultiThreader. More...
 

Detailed Description

template<class PixelType>
class itk::TractsToVectorImageFilter< PixelType >

Extracts the voxel-wise main directions of the input fiber bundle.

Definition at line 26 of file itkTractsToVectorImageFilter.h.

Member Typedef Documentation

template<class PixelType>
typedef SmartPointer< const Self > itk::TractsToVectorImageFilter< PixelType >::ConstPointer

Definition at line 33 of file itkTractsToVectorImageFilter.h.

template<class PixelType>
typedef VectorContainer< unsigned int, DirectionContainerType::Pointer > itk::TractsToVectorImageFilter< PixelType >::ContainerType

Definition at line 41 of file itkTractsToVectorImageFilter.h.

template<class PixelType>
typedef VectorContainer< unsigned int, DirectionType > itk::TractsToVectorImageFilter< PixelType >::DirectionContainerType

Definition at line 40 of file itkTractsToVectorImageFilter.h.

template<class PixelType>
typedef VectorContainer< unsigned int, ItkDirectionImageType::Pointer > itk::TractsToVectorImageFilter< PixelType >::DirectionImageContainerType

Definition at line 43 of file itkTractsToVectorImageFilter.h.

template<class PixelType>
typedef vnl_vector_fixed< double, 3 > itk::TractsToVectorImageFilter< PixelType >::DirectionType

Definition at line 39 of file itkTractsToVectorImageFilter.h.

template<class PixelType>
typedef Image< Vector< float, 3 >, 3> itk::TractsToVectorImageFilter< PixelType >::ItkDirectionImageType

Definition at line 42 of file itkTractsToVectorImageFilter.h.

template<class PixelType>
typedef itk::Image<double, 3> itk::TractsToVectorImageFilter< PixelType >::ItkDoubleImgType

Definition at line 45 of file itkTractsToVectorImageFilter.h.

template<class PixelType>
typedef itk::Image<unsigned char, 3> itk::TractsToVectorImageFilter< PixelType >::ItkUcharImgType

Definition at line 44 of file itkTractsToVectorImageFilter.h.

template<class PixelType>
typedef std::vector< OutputImageType::Pointer > itk::TractsToVectorImageFilter< PixelType >::OutputImageContainerType

Definition at line 37 of file itkTractsToVectorImageFilter.h.

Definition at line 36 of file itkTractsToVectorImageFilter.h.

template<class PixelType>
typedef itk::Vector<float,3> itk::TractsToVectorImageFilter< PixelType >::OutputVectorType

Definition at line 35 of file itkTractsToVectorImageFilter.h.

template<class PixelType>
typedef SmartPointer< Self > itk::TractsToVectorImageFilter< PixelType >::Pointer

Definition at line 32 of file itkTractsToVectorImageFilter.h.

Definition at line 30 of file itkTractsToVectorImageFilter.h.

template<class PixelType>
typedef ProcessObject itk::TractsToVectorImageFilter< PixelType >::Superclass

Definition at line 31 of file itkTractsToVectorImageFilter.h.

Constructor & Destructor Documentation

template<class PixelType >
itk::TractsToVectorImageFilter< PixelType >::TractsToVectorImageFilter ( )
protected

Definition at line 26 of file itkTractsToVectorImageFilter.cpp.

template<class PixelType >
itk::TractsToVectorImageFilter< PixelType >::~TractsToVectorImageFilter ( )
protectedvirtual

Definition at line 42 of file itkTractsToVectorImageFilter.cpp.

Member Function Documentation

template<class PixelType>
Pointer itk::TractsToVectorImageFilter< PixelType >::Clone ( ) const
template<class PixelType >
TractsToVectorImageFilter< PixelType >::DirectionContainerType::Pointer itk::TractsToVectorImageFilter< PixelType >::FastClustering ( DirectionContainerType::Pointer  inDirs,
std::vector< double >  lengths 
)
protected

cluster fiber directions

Definition at line 320 of file itkTractsToVectorImageFilter.cpp.

References max(), and mitk::New().

template<class PixelType >
void itk::TractsToVectorImageFilter< PixelType >::GenerateData ( )
overridevirtual

A version of GenerateData() specific for image processing filters.

This implementation will split the processing across multiple threads. The buffer is allocated by this method. Then the BeforeThreadedGenerateData() method is called (if provided). Then, a series of threads are spawned each calling ThreadedGenerateData(). After all the threads have completed processing, the AfterThreadedGenerateData() method is called (if provided). If an image processing filter cannot be threaded, the filter should provide an implementation of GenerateData(). That implementation is responsible for allocating the output buffer. If a filter an be threaded, it should NOT provide a GenerateData() method but should provide a ThreadedGenerateData() instead.

See also
ThreadedGenerateData()

Reimplemented from mitk::ImageSource< VectorImage< float, 3 > >.

Definition at line 69 of file itkTractsToVectorImageFilter.cpp.

References itk::CompareVectorLengths(), MITK_INFO, and mitk::New().

template<class PixelType>
virtual float itk::TractsToVectorImageFilter< PixelType >::GetAngularThreshold ( )
virtual

cluster directions that are closer together than the specified threshold

template<class PixelType>
virtual const char* itk::TractsToVectorImageFilter< PixelType >::GetClassName ( ) const
virtual
template<class PixelType>
virtual ContainerType::Pointer itk::TractsToVectorImageFilter< PixelType >::GetClusteredDirectionsContainer ( )
virtual

output directions

template<class PixelType>
virtual DirectionImageContainerType::Pointer itk::TractsToVectorImageFilter< PixelType >::GetDirectionImageContainer ( )
virtual

output directions

template<class PixelType>
itk::Point< double, 3 > itk::TractsToVectorImageFilter< PixelType >::GetItkPoint ( double  point[3])
protected

Definition at line 59 of file itkTractsToVectorImageFilter.cpp.

template<class PixelType>
virtual unsigned long itk::TractsToVectorImageFilter< PixelType >::GetMaxNumDirections ( )
virtual

If more directions are extracted, only the largest are kept.

template<class PixelType>
virtual bool itk::TractsToVectorImageFilter< PixelType >::GetNormalizeVectors ( )
virtual

Normalize vectors to length 1.

template<class PixelType>
virtual ItkUcharImgType::Pointer itk::TractsToVectorImageFilter< PixelType >::GetNumDirectionsImage ( )
virtual

number of directions per voxel

template<class PixelType>
virtual FiberBundle::Pointer itk::TractsToVectorImageFilter< PixelType >::GetOutputFiberBundle ( )
virtual

vector field for visualization purposes

template<class PixelType>
virtual float itk::TractsToVectorImageFilter< PixelType >::GetSizeThreshold ( )
virtual
template<class PixelType>
virtual bool itk::TractsToVectorImageFilter< PixelType >::GetUseWorkingCopy ( )
virtual

Do not modify input fiber bundle. Use a copy.

template<class PixelType>
vnl_vector_fixed< double, 3 > itk::TractsToVectorImageFilter< PixelType >::GetVnlVector ( double  point[3])
protected

Definition at line 48 of file itkTractsToVectorImageFilter.cpp.

template<class PixelType>
static Pointer itk::TractsToVectorImageFilter< PixelType >::New ( )
static

Referenced by main().

template<class PixelType>
virtual void itk::TractsToVectorImageFilter< PixelType >::SetAngularThreshold ( float  _arg)
virtual

cluster directions that are closer together than the specified threshold

template<class PixelType>
virtual void itk::TractsToVectorImageFilter< PixelType >::SetCreateDirectionImages ( bool  _arg)
virtual
template<class PixelType>
virtual void itk::TractsToVectorImageFilter< PixelType >::SetFiberBundle ( FiberBundle::Pointer  _arg)
virtual

input fiber bundle

template<class PixelType>
virtual void itk::TractsToVectorImageFilter< PixelType >::SetMaskImage ( ItkUcharImgType::Pointer  _arg)
virtual

only process voxels inside mask

template<class PixelType>
virtual void itk::TractsToVectorImageFilter< PixelType >::SetMaxNumDirections ( unsigned long  _arg)
virtual

If more directions are extracted, only the largest are kept.

template<class PixelType>
virtual void itk::TractsToVectorImageFilter< PixelType >::SetNormalizeVectors ( bool  _arg)
virtual

Normalize vectors to length 1.

template<class PixelType>
virtual void itk::TractsToVectorImageFilter< PixelType >::SetSizeThreshold ( float  _arg)
virtual
template<class PixelType>
virtual void itk::TractsToVectorImageFilter< PixelType >::SetUseWorkingCopy ( bool  _arg)
virtual

Do not modify input fiber bundle. Use a copy.

Member Data Documentation

template<class PixelType>
float itk::TractsToVectorImageFilter< PixelType >::m_AngularThreshold
protected

cluster directions that are closer together than the specified threshold

Definition at line 86 of file itkTractsToVectorImageFilter.h.

template<class PixelType>
ContainerType::Pointer itk::TractsToVectorImageFilter< PixelType >::m_ClusteredDirectionsContainer
protected

contains direction vectors for each voxel

Definition at line 98 of file itkTractsToVectorImageFilter.h.

template<class PixelType>
bool itk::TractsToVectorImageFilter< PixelType >::m_CreateDirectionImages
protected

Definition at line 95 of file itkTractsToVectorImageFilter.h.

template<class PixelType>
DirectionImageContainerType::Pointer itk::TractsToVectorImageFilter< PixelType >::m_DirectionImageContainer
protected

contains images that contain the output directions

Definition at line 100 of file itkTractsToVectorImageFilter.h.

template<class PixelType>
ContainerType::Pointer itk::TractsToVectorImageFilter< PixelType >::m_DirectionsContainer
protected

container for fiber directions

Definition at line 91 of file itkTractsToVectorImageFilter.h.

template<class PixelType>
float itk::TractsToVectorImageFilter< PixelType >::m_Epsilon
protected

epsilon for vector equality check

Definition at line 87 of file itkTractsToVectorImageFilter.h.

template<class PixelType>
FiberBundle::Pointer itk::TractsToVectorImageFilter< PixelType >::m_FiberBundle
protected

input fiber bundle

Definition at line 85 of file itkTractsToVectorImageFilter.h.

template<class PixelType>
ItkUcharImgType::Pointer itk::TractsToVectorImageFilter< PixelType >::m_MaskImage
protected

only voxels inside the binary mask are processed

Definition at line 88 of file itkTractsToVectorImageFilter.h.

template<class PixelType>
unsigned long itk::TractsToVectorImageFilter< PixelType >::m_MaxNumDirections
protected

if more directions per voxel are extracted, only the largest are kept

Definition at line 93 of file itkTractsToVectorImageFilter.h.

template<class PixelType>
bool itk::TractsToVectorImageFilter< PixelType >::m_NormalizeVectors
protected

normalize vectors to length 1

Definition at line 89 of file itkTractsToVectorImageFilter.h.

template<class PixelType>
ItkUcharImgType::Pointer itk::TractsToVectorImageFilter< PixelType >::m_NumDirectionsImage
protected

shows number of fibers per voxel

Definition at line 99 of file itkTractsToVectorImageFilter.h.

template<class PixelType>
itk::Vector<float> itk::TractsToVectorImageFilter< PixelType >::m_OutImageSpacing
protected

spacing of output image

Definition at line 90 of file itkTractsToVectorImageFilter.h.

template<class PixelType>
FiberBundle::Pointer itk::TractsToVectorImageFilter< PixelType >::m_OutputFiberBundle
protected

vector field for visualization purposes

Definition at line 101 of file itkTractsToVectorImageFilter.h.

template<class PixelType>
float itk::TractsToVectorImageFilter< PixelType >::m_SizeThreshold
protected

Definition at line 94 of file itkTractsToVectorImageFilter.h.

template<class PixelType>
bool itk::TractsToVectorImageFilter< PixelType >::m_UseWorkingCopy
protected

do not modify input fiber bundle but work on copy

Definition at line 92 of file itkTractsToVectorImageFilter.h.


The documentation for this class was generated from the following files: