36 #include "Exception.hpp" 37 #include <boost/filesystem.hpp> 38 #define _BACKWARD_BACKWARD_WARNING_H 1 //Cut out the vtk deprecated warning 39 #include <vtkXMLImageDataWriter.h> 40 #include <vtkVersion.h> 41 #include "PetscTools.hpp" 42 #include "RegularGridWriter.hpp" 45 : mpVtkImage(vtkSmartPointer<vtkImageData>::New()),
76 EXCEPTION(
"Output file not specified for image writer.");
81 EXCEPTION(
"Output image not set for image writer.");
84 if(PetscTools::AmMaster())
86 vtkSmartPointer<vtkXMLImageDataWriter> p_writer1 = vtkSmartPointer<vtkXMLImageDataWriter>::New();
87 p_writer1->SetFileName(
mFilepath.c_str());
88 #if VTK_MAJOR_VERSION <= 5
vtkSmartPointer< vtkImageData > mpVtkImage
static boost::shared_ptr< RegularGridWriter > Create()
void SetFilename(const std::string &rFilename)
void SetImage(vtkSmartPointer< vtkImageData > pImage)