1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
5 - University of LYON http://www.universite-lyon.fr/
6 - Léon Bérard cancer center http://www.centreleonberard.fr
7 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the copyright notices for more information.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
18 #ifndef vvImageReader_H
19 #define vvImageReader_H
23 #include "itkCommand.h"
26 class vvImageReader : public itk::LightObject {
30 typedef enum _IMAGETYPE {
41 typedef vvImageReader Self;
42 typedef itk::SmartPointer<Self> Pointer;
45 const std::vector<std::string>& GetInputFilenames(){return mInputFilenames;}
47 void SetInputFilename(const std::string & filename);
48 void SetInputFilenames(const std::vector<std::string> & filenames);
50 vvImage::Pointer GetOutput() {
54 std::string GetLastError() {
58 void SetSlice(unsigned int i) { mSlice = i; }
60 //====================================================================
63 void Update(LoadedImageType type);
64 void Update(int dim, std::string InputPixelType, LoadedImageType type);
67 //====================================================================
68 std::vector<std::string> mInputFilenames;
69 ///Method used to load the image, see vvConstants.h for definition
70 LoadedImageType mType;
72 itk::Command::Pointer mObserver;
74 std::string mLastError;
76 //====================================================================
77 template<unsigned int VImageDimension>
78 void UpdateWithDim(std::string inputPixelType);
80 //====================================================================
81 /*template<unsigned int VImageDimension>
82 void ExtractWithDim(std::string inputPixelType, int slice);*/
84 //====================================================================
85 template<class InputPixelType, unsigned int VImageDimension>
86 void UpdateWithDimAndInputPixelType();
87 ///Input dimension and pixel type
89 std::string mInputPixelType;
91 //====================================================================
92 void ReadNkiImageTransform();
93 void ReadMatImageTransform();
98 vvImage::Pointer mImage;
99 }; // end class vvImageReader
101 #endif /* end #define CLITKvvImageReader_H */