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 void SetInputFilename(const std::string & filename);
46 void SetInputFilenames(const std::vector<std::string> & filenames);
48 vvImage::Pointer GetOutput() {
52 std::string GetLastError() {
56 void SetSlice(unsigned int i) { mSlice = i; }
58 //====================================================================
61 void Update(LoadedImageType type);
62 void Update(int dim, std::string InputPixelType, LoadedImageType type);
65 //====================================================================
66 std::vector<std::string> mInputFilenames;
67 ///Method used to load the image, see vvConstants.h for definition
68 LoadedImageType mType;
70 itk::Command::Pointer mObserver;
72 std::string mLastError;
74 //====================================================================
75 template<unsigned int VImageDimension>
76 void UpdateWithDim(std::string inputPixelType);
78 //====================================================================
79 /*template<unsigned int VImageDimension>
80 void ExtractWithDim(std::string inputPixelType, int slice);*/
82 //====================================================================
83 template<class InputPixelType, unsigned int VImageDimension>
84 void UpdateWithDimAndInputPixelType();
85 ///Input dimension and pixel type
87 std::string mInputPixelType;
89 //====================================================================
90 void ReadNkiImageTransform();
91 void ReadMatImageTransform();
96 vvImage::Pointer mImage;
97 }; // end class vvImageReader
99 #endif /* end #define CLITKvvImageReader_H */