diff --git a/Modules/DiffusionImaging/IODataStructures/TbssImages/mitkTbssImage.cpp b/Modules/DiffusionImaging/IODataStructures/TbssImages/mitkTbssImage.cpp index e67cd48478..0001c88bfd 100644 --- a/Modules/DiffusionImaging/IODataStructures/TbssImages/mitkTbssImage.cpp +++ b/Modules/DiffusionImaging/IODataStructures/TbssImages/mitkTbssImage.cpp @@ -1,45 +1,50 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date: 2008-02-08 11:19:03 +0100 (Fr, 08 Feb 2008) $ Version: $Revision: 11989 $ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html 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 __mitkTbssImage__cpp +#define __mitkTbssImage__cpp + + #include "mitkTbssImage.h" #include "itkImageRegionIterator.h" #include "itkImageRegionConstIterator.h" #include "mitkImageCast.h" /* template mitk::TbssImage::TbssImage() { } template mitk::TbssImage::~TbssImage() { } template void mitk::TbssImage::InitializeFromImage() { } */ +#endif /* __mitkTbssImage__cpp */ diff --git a/Modules/DiffusionImaging/IODataStructures/TbssImages/mitkTbssImage.h b/Modules/DiffusionImaging/IODataStructures/TbssImages/mitkTbssImage.h index df234ac328..f9ebd220cd 100644 --- a/Modules/DiffusionImaging/IODataStructures/TbssImages/mitkTbssImage.h +++ b/Modules/DiffusionImaging/IODataStructures/TbssImages/mitkTbssImage.h @@ -1,127 +1,128 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date: 2008-02-07 17:17:57 +0100 (Do, 07 Feb 2008) $ Version: $Revision: 11989 $ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html 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 __mitkTbssImage__h #define __mitkTbssImage__h #include "mitkImage.h" #include "itkImage.h" #include "mitkImageCast.h" +#include "MitkDiffusionImagingExports.h" namespace mitk { /** * \brief this class encapsulates diffusion volumes (vectorimages not * yet supported by mitkImage) */ template - class TbssImage : public Image + class MitkDiffusionImaging_EXPORT TbssImage : public Image { public: typedef TPixelType PixelType; typedef typename itk::Image ImageType; typedef itk::Index<3> IndexType; typedef typename std::vector RoiType; mitkClassMacro( TbssImage, Image ) itkNewMacro(Self) enum Type{ ROI, SKELETON }; //void SetRequestedRegionToLargestPossibleRegion(); //bool RequestedRegionIsOutsideOfTheBufferedRegion(); //virtual bool VerifyRequestedRegion(); //void SetRequestedRegion(itk::DataObject *data); typename ImageType::Pointer GetImage() { return m_Image; } void SetImage(typename ImageType::Pointer image ) { this->m_Image = image; } itkSetMacro(TbssType, Type) itkGetMacro(TbssType, Type) itkGetMacro(PreprocessedFA, bool) itkSetMacro(PreprocessedFA, bool) itkGetMacro(PreprocessedFAFile, std::string) itkSetMacro(PreprocessedFAFile, std::string) itkGetMacro(Structure, std::string) itkSetMacro(Structure, std::string) void SetRoi(RoiType roi) { m_Roi = roi; } RoiType GetRoi() { return m_Roi; } void InitializeFromImage() { MITK_INFO << "make an mitk image that can be shown by mitk"; this->InitializeByItk(m_Image.GetPointer(),1,1); } protected: TbssImage():m_PreprocessedFA(false) { } virtual ~TbssImage(){} typename ImageType::Pointer m_Image; Type m_TbssType; RoiType m_Roi; bool m_PreprocessedFA; std::string m_PreprocessedFAFile; std::string m_Structure; }; // Does the same es the normal CastToMitkImage, but needed to reimplemented due to the templatet pixeltype template void CastToTbssImage(const ItkOutputImageType* itkimage, itk::SmartPointer< mitk::TbssImage >& tbssoutputimage) { if(tbssoutputimage.IsNull()) { tbssoutputimage = mitk::TbssImage::New(); } tbssoutputimage->InitializeByItk(itkimage); tbssoutputimage->SetChannel(itkimage->GetBufferPointer()); } } // namespace mitk #include "mitkTbssImage.cpp" #endif /* __mitkTbssImage__h */