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 vvImageWriter_H
19 #define vvImageWriter_H
24 #include "itkCommand.h"
34 void SetOutputFileName(std::string filename);
35 void SetObserver(itk::Command::Pointer o) {
36 mUseAnObserver = true;
39 void DisableObserver() {
40 mUseAnObserver = false;
43 void SetInput(vvImage::Pointer image) {
47 std::string GetLastError() {
51 //====================================================================
54 Update(mImage->GetNumberOfDimensions(),mImage->GetScalarTypeAsString());
56 void Update(int dim, std::string OutputPixelType);
59 //====================================================================
60 std::string mOutputFilename;
61 itk::Command::Pointer mObserver;
63 std::string mLastError;
66 //====================================================================
67 template<unsigned int VImageDimension>
68 void UpdateWithDim(std::string OutputPixelType);
70 //====================================================================
71 template<class OutputPixelType, unsigned int VImageDimension>
72 void UpdateWithDimAndOutputPixelType();
75 vvImage::Pointer mImage;
77 }; // end class vvImageWriter
79 #endif /* end #define vvImageWriter_H */