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://oncora1.lyon.fnclcc.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
24 #include "itkCommand.h"
26 #include "vvConstants.h"
28 class vvImageReader : public QThread {
34 void SetInputFilename(const std::string & filename);
35 void SetInputFilenames(const std::vector<std::string> & filenames);
37 vvImage::Pointer GetOutput() {
41 std::string GetLastError() {
45 //====================================================================
48 void Update(LoadedImageType type);
49 void Update(int dim, std::string InputPixelType, LoadedImageType type);
50 //void Extract(int dim, std::string InputPixelType, int slice);
54 //====================================================================
55 std::vector<std::string> mInputFilenames;
56 ///Method used to load the image, see vvConstants.h for definition
57 LoadedImageType mType;
58 itk::Command::Pointer mObserver;
60 std::string mLastError;
62 //====================================================================
63 template<unsigned int VImageDimension>
64 void UpdateWithDim(std::string inputPixelType);
66 //====================================================================
67 /*template<unsigned int VImageDimension>
68 void ExtractWithDim(std::string inputPixelType, int slice);*/
70 //====================================================================
71 template<class InputPixelType, unsigned int VImageDimension>
72 void UpdateWithDimAndInputPixelType();
73 ///Input dimension and pixel type
75 std::string mInputPixelType;
77 //====================================================================
78 void ReadNkiImageTransform();
79 void ReadMatImageTransform();
81 vvImage::Pointer mImage;
83 }; // end class vvImageReader
85 #endif /* end #define CLITKvvImageReader_H */