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 {
40 VECTORPIXELIMAGEWITHTIME,
44 typedef vvImageReader Self;
45 typedef itk::SmartPointer<Self> Pointer;
48 const std::vector<std::string>& GetInputFilenames(){return mInputFilenames;}
50 void SetInputFilename(const std::string & filename);
51 void SetInputFilenames(const std::vector<std::string> & filenames);
53 vvImage::Pointer GetOutput() {
57 std::string GetLastError() {
61 void SetSlice(unsigned int i) { mSlice = i; }
63 //====================================================================
66 void Update(LoadedImageType type);
67 void Update(int dim, std::string InputPixelType, LoadedImageType type);
70 //====================================================================
71 std::vector<std::string> mInputFilenames;
72 ///Method used to load the image, see vvConstants.h for definition
73 LoadedImageType mType;
75 itk::Command::Pointer mObserver;
77 std::string mLastError;
79 //====================================================================
80 template<unsigned int VImageDimension>
81 void UpdateWithDim(std::string inputPixelType);
83 //====================================================================
84 /*template<unsigned int VImageDimension>
85 void ExtractWithDim(std::string inputPixelType, int slice);*/
87 //====================================================================
88 template<class InputPixelType, unsigned int VImageDimension>
89 void UpdateWithDimAndInputPixelType();
90 template<class InputPixelType, unsigned int VImageDimension>
91 void UpdateWithDimAndInputVectorPixelType();
92 ///Input dimension and pixel type
94 std::string mInputPixelType;
96 //====================================================================
97 // void ReadNkiImageTransform();
98 void ReadMatImageTransform();
103 vvImage::Pointer mImage;
104 }; // end class vvImageReader
106 #endif /* end #define CLITKvvImageReader_H */