1 /*=========================================================================
5 Author : Pierre Seroul (pierre.seroul@gmail.com)
8 Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr
9 CREATIS-LRMN http://www.creatis.insa-lyon.fr
11 This program is free software: you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation, version 3 of the License.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program. If not, see <http://www.gnu.org/licenses/>.
23 =========================================================================*/
24 #ifndef vvImageReader_H
25 #define vvImageReader_H
31 #include "itkCommand.h"
33 #include "vvConstants.h"
35 class vvImageReader : public QThread {
41 void SetInputFilename(const std::string & filename);
42 void SetInputFilenames(const std::vector<std::string> & filenames);
44 vvImage::Pointer GetOutput() {
48 std::string GetLastError() {
52 //====================================================================
55 void Update(LoadedImageType type);
56 void Update(int dim, std::string InputPixelType, LoadedImageType type);
57 //void Extract(int dim, std::string InputPixelType, int slice);
61 //====================================================================
62 std::vector<std::string> mInputFilenames;
63 ///Method used to load the image, see vvConstants.h for definition
64 LoadedImageType mType;
65 itk::Command::Pointer mObserver;
67 std::string mLastError;
69 //====================================================================
70 template<unsigned int VImageDimension>
71 void UpdateWithDim(std::string inputPixelType);
73 //====================================================================
74 /*template<unsigned int VImageDimension>
75 void ExtractWithDim(std::string inputPixelType, int slice);*/
77 //====================================================================
78 template<class InputPixelType, unsigned int VImageDimension>
79 void UpdateWithDimAndInputPixelType();
80 ///Input dimension and pixel type
82 std::string mInputPixelType;
85 vvImage::Pointer mImage;
87 }; // end class vvImageReader
89 #endif /* end #define CLITKvvImageReader_H */