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 {
42 typedef vvImageReader Self;
43 typedef itk::SmartPointer<Self> Pointer;
46 const std::vector<std::string>& GetInputFilenames(){return mInputFilenames;}
48 void SetInputFilename(const std::string & filename);
49 void SetInputFilenames(const std::vector<std::string> & filenames);
51 vvImage::Pointer GetOutput() {
55 std::string GetLastError() {
59 void SetSlice(unsigned int i) { mSlice = i; }
61 //====================================================================
64 void Update(LoadedImageType type);
65 void Update(int dim, std::string InputPixelType, LoadedImageType type);
68 //====================================================================
69 std::vector<std::string> mInputFilenames;
70 ///Method used to load the image, see vvConstants.h for definition
71 LoadedImageType mType;
73 itk::Command::Pointer mObserver;
75 std::string mLastError;
77 //====================================================================
78 template<unsigned int VImageDimension>
79 void UpdateWithDim(std::string inputPixelType);
81 //====================================================================
82 /*template<unsigned int VImageDimension>
83 void ExtractWithDim(std::string inputPixelType, int slice);*/
85 //====================================================================
86 template<class InputPixelType, unsigned int VImageDimension>
87 void UpdateWithDimAndInputPixelType();
88 ///Input dimension and pixel type
90 std::string mInputPixelType;
92 //====================================================================
93 void ReadNkiImageTransform();
94 void ReadMatImageTransform();
99 vvImage::Pointer mImage;
100 }; // end class vvImageReader
102 #endif /* end #define CLITKvvImageReader_H */