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 void SetSlice(unsigned int i) { mSlice = i; }
47 //====================================================================
50 void Update(LoadedImageType type);
51 void Update(int dim, std::string InputPixelType, LoadedImageType type);
55 //====================================================================
56 std::vector<std::string> mInputFilenames;
57 ///Method used to load the image, see vvConstants.h for definition
58 LoadedImageType mType;
60 itk::Command::Pointer mObserver;
62 std::string mLastError;
64 //====================================================================
65 template<unsigned int VImageDimension>
66 void UpdateWithDim(std::string inputPixelType);
68 //====================================================================
69 /*template<unsigned int VImageDimension>
70 void ExtractWithDim(std::string inputPixelType, int slice);*/
72 //====================================================================
73 template<class InputPixelType, unsigned int VImageDimension>
74 void UpdateWithDimAndInputPixelType();
75 ///Input dimension and pixel type
77 std::string mInputPixelType;
79 //====================================================================
80 void ReadNkiImageTransform();
81 void ReadMatImageTransform();
83 vvImage::Pointer mImage;
85 }; // end class vvImageReader
87 #endif /* end #define CLITKvvImageReader_H */