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 itk::LightObject, public QThread {
31 typedef vvImageReader Self;
32 typedef itk::SmartPointer<Self> Pointer;
35 void SetInputFilename(const std::string & filename);
36 void SetInputFilenames(const std::vector<std::string> & filenames);
38 vvImage::Pointer GetOutput() {
42 std::string GetLastError() {
46 void SetSlice(unsigned int i) { mSlice = i; }
48 //====================================================================
51 void Update(LoadedImageType type);
52 void Update(int dim, std::string InputPixelType, LoadedImageType type);
56 //====================================================================
57 std::vector<std::string> mInputFilenames;
58 ///Method used to load the image, see vvConstants.h for definition
59 LoadedImageType mType;
61 itk::Command::Pointer mObserver;
63 std::string mLastError;
65 //====================================================================
66 template<unsigned int VImageDimension>
67 void UpdateWithDim(std::string inputPixelType);
69 //====================================================================
70 /*template<unsigned int VImageDimension>
71 void ExtractWithDim(std::string inputPixelType, int slice);*/
73 //====================================================================
74 template<class InputPixelType, unsigned int VImageDimension>
75 void UpdateWithDimAndInputPixelType();
76 ///Input dimension and pixel type
78 std::string mInputPixelType;
80 //====================================================================
81 void ReadNkiImageTransform();
82 void ReadMatImageTransform();
87 vvImage::Pointer mImage;
88 }; // end class vvImageReader
90 #endif /* end #define CLITKvvImageReader_H */