00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date: 2009-07-14 19:11:20 +0200 (Tue, 14 Jul 2009) $ 00006 Version: $Revision: 18127 $ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 #ifndef __mitkNrrdTensorImageReader_h 00019 #define __mitkNrrdTensorImageReader_h 00020 00021 #include "mitkCommon.h" 00022 #include "itkVectorContainer.h" 00023 #include "mitkFileReader.h" 00024 #include "vnl/vnl_vector_fixed.h" 00025 #include "mitkTensorImage.h" 00026 #include "mitkTensorImageSource.h" 00027 #include "itkVectorImage.h" 00028 00029 namespace mitk 00030 { 00031 00035 class NrrdTensorImageReader : public mitk::TensorImageSource, public FileReader 00036 { 00037 public: 00038 00039 typedef mitk::TensorImage OutputType; 00040 typedef mitk::TensorImageSource DTImgSourceType; 00041 00042 mitkClassMacro( NrrdTensorImageReader, DTImgSourceType ); 00043 itkNewMacro(Self); 00044 00045 const char* GetFileName() const; 00046 void SetFileName(const char* aFileName); 00047 const char* GetFilePrefix() const; 00048 void SetFilePrefix(const char* aFilePrefix); 00049 const char* GetFilePattern() const; 00050 void SetFilePattern(const char* aFilePattern); 00051 00052 static bool CanReadFile(const std::string filename, const std::string filePrefix, const std::string filePattern); 00053 00054 protected: 00055 00057 virtual void GenerateData(); 00058 virtual void GenerateOutputInformation(); 00059 00060 std::string m_FileName; 00061 std::string m_FilePrefix; 00062 std::string m_FilePattern; 00063 00064 private: 00065 void operator=(const Self&); //purposely not implemented 00066 }; 00067 00068 } //namespace MITK 00069 00070 #endif // __mitkNrrdTensorImageReader_h