/*========================================================================= Program: Tensor ToolKit - TTK Module: $URL$ Language: C++ Date: $Date$ Version: $Revision$ Copyright (c) INRIA 2010. All rights reserved. See LICENSE.txt for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #ifndef _itk_CrossingTensorImageSource_h_ #define _itk_CrossingTensorImageSource_h_ #include "itkImageSource.h" #include "itkFixedArray.h" #include "itkSize.h" namespace itk { template class CrossingTensorImageSource : public ImageSource { public: typedef CrossingTensorImageSource Self; typedef ImageSource Superclass; typedef SmartPointer Pointer; typedef SmartPointer ConstPointer; itkNewMacro (Self); itkTypeMacro (CrossingTensorImageSource, ImageSource); typedef TTensorImage TensorImageType; typedef typename TensorImageType::PixelType TensorType; typedef typename TensorImageType::RegionType RegionType; typedef typename TensorImageType::PointType PointType; typedef typename TensorImageType::SpacingType SpacingType; typedef typename TensorType::VectorType VectorType; itkSetMacro (NumberOfCrossings, unsigned int); itkGetMacro (NumberOfCrossings, unsigned int); /** Dimensionality of the output image */ itkStaticConstMacro(NDimensions, unsigned int, TensorImageType::ImageDimension); /** Type used to store gaussian parameters. */ typedef FixedArray ArrayType; /** Size type matches that used for images */ typedef Size SizeType; /** Specify the size of the output image. */ virtual void SetSize( const unsigned long* values); /** Specify the size of the output image. */ virtual void SetSize( const SizeType values); /** Get the size of the output image. */ itkGetVectorMacro(Size,const unsigned long,NDimensions); /** Specify the spacing of the output image. */ virtual void SetSpacing( const SpacingType& values); virtual void SetSpacing( const float* values); virtual void SetSpacing( const double* values); /** Get the spacing of the output image. */ itkGetMacro(Spacing,const SpacingType); /** Specify the origin of the output image. */ virtual void SetOrigin( const PointType& values); virtual void SetOrigin( const float* values); virtual void SetOrigin( const double* values); /** Get the origin of the output image. */ itkGetMacro(Origin,PointType); itkSetMacro (Radius, double); itkGetMacro (Radius, double); protected: CrossingTensorImageSource() { m_NumberOfCrossings = 0; for (unsigned int i=0; i