]> Creatis software - clitk.git/blob - vv/vvImageReader.h
removed headers
[clitk.git] / vv / vvImageReader.h
1 #ifndef vvImageReader_H
2 #define vvImageReader_H
3 #include <string>
4 #include <vector>
5 #include <QThread>
6
7 #include "itkCommand.h"
8 #include "vvImage.h"
9 #include "vvConstants.h"
10
11 class vvImageReader : public QThread {
12
13 public:
14     vvImageReader();
15     ~vvImageReader();
16
17     void SetInputFilename(const std::string & filename);
18     void SetInputFilenames(const std::vector<std::string> & filenames);
19
20     vvImage::Pointer GetOutput() {
21         return mImage;
22     }
23
24     std::string GetLastError() {
25         return mLastError;
26     }
27
28     //====================================================================
29     // Main function
30     void Update();
31     void Update(LoadedImageType type);
32     void Update(int dim, std::string InputPixelType, LoadedImageType type);
33     //void Extract(int dim, std::string InputPixelType, int slice);
34
35 protected:
36     void run();
37     //====================================================================
38     std::vector<std::string> mInputFilenames;
39     ///Method used to load the image, see vvConstants.h for definition
40     LoadedImageType mType;
41     itk::Command::Pointer mObserver;
42
43     std::string mLastError;
44
45     //====================================================================
46     template<unsigned int VImageDimension>
47     void UpdateWithDim(std::string inputPixelType);
48
49     //====================================================================
50     /*template<unsigned int VImageDimension>
51     void ExtractWithDim(std::string inputPixelType, int slice);*/
52
53     //====================================================================
54     template<class InputPixelType, unsigned int VImageDimension>
55     void UpdateWithDimAndInputPixelType();
56     ///Input dimension and pixel type
57     int mDim;
58     std::string mInputPixelType;
59
60 private:
61     vvImage::Pointer mImage;
62
63 }; // end class vvImageReader
64
65 #endif /* end #define CLITKvvImageReader_H */
66