Authors belong to:
- University of LYON http://www.universite-lyon.fr/
- - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr
+ - Léon Bérard cancer center http://www.centreleonberard.fr
- CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
This software is distributed WITHOUT ANY WARRANTY; without even
- BSD See included LICENSE.txt file
- CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-======================================================================-====*/
+===========================================================================**/
#include <string>
#include <fstream>
#include "vtkObjectFactory.h"
#include "vtkStreamingDemandDrivenPipeline.h"
#include "vtkDataSetAttributes.h"
-
-#include <vtkstd/string>
+#include <vtkVersion.h>
+#include <vtkAlgorithm.h>
#include <sys/stat.h>
//----------------------------------------------------------------------------
-vtkCxxRevisionMacro(vtkVOXImageWriter, "DummyRevision");
vtkStandardNewMacro(vtkVOXImageWriter);
//----------------------------------------------------------------------------
void vtkVOXImageWriter::Write( )
{
this->SetErrorCode(vtkErrorCode::NoError);
-
+#if VTK_MAJOR_VERSION <= 5
this->GetInput()->UpdateInformation();
-
+#else
+ this->UpdateInformation();
+#endif
// Error checking
if (this->GetInput() == NULL ) {
vtkErrorMacro(<<"Write:Please specify an input!");
}
int nDims = 3;
+#if VTK_MAJOR_VERSION <= 5
int * ext = this->GetInput()->GetWholeExtent();
+#else
+ int * ext = this->GetInformation()->Get(vtkDataObject::DATA_EXTENT());
+#endif
if ( ext[4] == ext[5] ) {
nDims = 2;
if ( ext[2] == ext[3] ) {
origin[1] += ext[2] * spacing[1];
origin[2] += ext[4] * spacing[2];
+#if VTK_MAJOR_VERSION <= 5
this->GetInput()->SetUpdateExtent(ext[0], ext[1],
ext[2], ext[3],
ext[4], ext[5]);
this->GetInput()->UpdateData();
-
-
+#elif VTK_MAJOR_VERSION >= 8 || (VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION >= 1)
+ this->UpdateExtent(ext);
+ this->Update();
+#else
+ this->SetUpdateExtent(ext);
+ this->Update();
+#endif
this->SetFileDimensionality(nDims);
this->InvokeEvent(vtkCommand::StartEvent);