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 vvImageWriter_H
25 #define vvImageWriter_H
31 #include "itkCommand.h"
41 void SetOutputFileName(std::string filename);
42 void SetObserver(itk::Command::Pointer o) {
43 mUseAnObserver = true;
46 void DisableObserver() {
47 mUseAnObserver = false;
50 void SetInput(vvImage::Pointer image) {
54 std::string GetLastError() {
58 //====================================================================
61 Update(mImage->GetNumberOfDimensions(),mImage->GetScalarTypeAsString());
63 void Update(int dim, std::string OutputPixelType);
66 //====================================================================
67 std::string mOutputFilename;
68 itk::Command::Pointer mObserver;
70 std::string mLastError;
73 //====================================================================
74 template<unsigned int VImageDimension>
75 void UpdateWithDim(std::string OutputPixelType);
77 //====================================================================
78 template<class OutputPixelType, unsigned int VImageDimension>
79 void UpdateWithDimAndOutputPixelType();
82 vvImage::Pointer mImage;
84 }; // end class vvImageWriter
86 #endif /* end #define vvImageWriter_H */