diff --git a/Modules/DiffusionImaging/DiffusionCore/Algorithms/itkProjectionFilter.h b/Modules/DiffusionImaging/DiffusionCore/Algorithms/itkProjectionFilter.h index f83a27f20e..163bf99444 100644 --- a/Modules/DiffusionImaging/DiffusionCore/Algorithms/itkProjectionFilter.h +++ b/Modules/DiffusionImaging/DiffusionCore/Algorithms/itkProjectionFilter.h @@ -1,125 +1,155 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef ITKPROJECTIONFILTER_H_ #define ITKPROJECTIONFILTER_H_ #include "itkObject.h" #include "itkImage.h" #include "mitkImage.h" #include "mitkTbssImage.h" namespace itk { -class ProjectionFilter : public Object -{ - /*! - \brief itkProjectionFilter - - \brief Performs the Projection Step of the TBSS algorithm from Smith et al. 2006. +/** + * \brief Projection part of the TBSS pipeline + * + * This class performs the projection step of the TBSS pipeline + * (see Smith et al., 2009. http://dx.doi.org/10.1016/j.neuroimage.2006.02.024 ) + * As input it takes a binary skeleton, a distance map, and a vector image containing the image gradients + * that are typically provided by the itkSkeletonizationFilter and the itkDistanceMapFilter. */ + +class ProjectionFilter : public Object +{ + public: typedef itk::Image RealImageType; typedef itk::CovariantVector VectorType; typedef itk::Image VectorImageType; typedef itk::Image CharImageType; typedef itk::Image Float4DImageType; typedef itk::Image FloatImageType; - // typedef itk::VectorImageType SubjectVolumesType; public: /** */ typedef ProjectionFilter Self; /** Superclass */ typedef Object Superclass; /** Smart Pointer */ typedef SmartPointer Pointer; /** Smart Pointer */ typedef SmartPointer ConstPointer; /** */ itkNewMacro( Self) - /** Generate Data. The image will be divided into a number of pieces, a number of threads - will be spawned and Threaded GenerateData() will be called in each thread. */ + + /** \brief Does the actual projection */ void Project(); + + /** \brief Set the distance map + * + * Sets the distance map that decodes for every voxel the distance to the nearest point on the skeleton. + */ itkSetMacro(DistanceMap, RealImageType::Pointer) + + /** \brief Set the directions + * + * Sets the direction calculated by the TBSS skeletonization algorithm in itkSkeletonizationFilter. + */ itkSetMacro(Directions, VectorImageType::Pointer) + + /** \brief Set the binary skeleton + * + * Sets the binary skeleton that defines on which voxels must be projected. + */ itkSetMacro(Skeleton, CharImageType::Pointer) + + /** \brief Set the mask defining tubular structures on the skeleton + * + * Sets a binary mask that defines wich part of the white matter skeleton are tubular instead of sheet like. + * This is important because the a different projection method is used for sheet like structues and + * tubular structures. + */ itkSetMacro(Tube, CharImageType::Pointer) + + /** \brief Set a 4D image containing the 3D registered FA maps of all study subjects. */ itkSetMacro(AllFA, Float4DImageType::Pointer) + + /** \brief Returns a 4D image containing the skeleton projections of all subjects */ itkGetMacro(Projections, Float4DImageType::Pointer) protected: /** Constructor */ ProjectionFilter(); /** Destructor */ virtual ~ProjectionFilter(); RealImageType::Pointer m_DistanceMap; VectorImageType::Pointer m_Directions; CharImageType::Pointer m_Skeleton; CharImageType::Pointer m_Tube; Float4DImageType::Pointer m_Projections; Float4DImageType::Pointer m_AllFA; int round(float x) { if (x>0.0) return ((int) (x+0.5)); else return ((int) (x-0.5)); } protected: }; } #ifndef ITK_MANUAL_INSTANTIATION #include "itkProjectionFilter.txx" #endif #endif