Commit 2df77605 authored by Brad King's avatar Brad King
Browse files

BUG: CopyOutputInformation must copy the WHOLE_EXTENT for structured data. ...

BUG: CopyOutputInformation must copy the WHOLE_EXTENT for structured data.  This addresses bug#2061.
parent 95682913
......@@ -22,7 +22,7 @@
#include "vtkInformation.h"
#include "vtkStreamingDemandDrivenPipeline.h"
vtkCxxRevisionMacro(vtkXMLImageDataReader, "1.10");
vtkCxxRevisionMacro(vtkXMLImageDataReader, "1.11");
vtkStandardNewMacro(vtkXMLImageDataReader);
//----------------------------------------------------------------------------
......@@ -128,10 +128,6 @@ void vtkXMLImageDataReader::CopyOutputInformation(vtkInformation *outInfo, int p
{
outInfo->CopyEntry( localInfo, vtkDataObject::SPACING() );
}
if ( localInfo->Has(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()) )
{
outInfo->CopyEntry( localInfo, vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT() );
}
}
......
......@@ -43,6 +43,7 @@ public:
vtkImageData *GetOutput();
vtkImageData *GetOutput(int idx);
// Description:
// For the specified port, copy the information this reader sets up in
// SetupOutputInformation to outInfo
virtual void CopyOutputInformation(vtkInformation *outInfo, int port);
......
......@@ -17,11 +17,13 @@
#include "vtkDataArray.h"
#include "vtkDataSet.h"
#include "vtkExtentSplitter.h"
#include "vtkInformation.h"
#include "vtkStreamingDemandDrivenPipeline.h"
#include "vtkTableExtentTranslator.h"
#include "vtkXMLDataElement.h"
#include "vtkXMLStructuredDataReader.h"
vtkCxxRevisionMacro(vtkXMLPStructuredDataReader, "1.20");
vtkCxxRevisionMacro(vtkXMLPStructuredDataReader, "1.21");
//----------------------------------------------------------------------------
vtkXMLPStructuredDataReader::vtkXMLPStructuredDataReader()
......@@ -181,6 +183,23 @@ vtkXMLPStructuredDataReader::ReadPrimaryElement(vtkXMLDataElement* ePrimary)
}
//----------------------------------------------------------------------------
void
vtkXMLPStructuredDataReader::CopyOutputInformation(vtkInformation* outInfo,
int port)
{
// Let the superclass copy information first.
this->Superclass::CopyOutputInformation(outInfo, port);
// All structured data has a whole extent.
vtkInformation* localInfo = this->GetExecutive()->GetOutputInformation(port);
if(localInfo->Has(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()))
{
outInfo->CopyEntry(localInfo,
vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT());
}
}
void vtkXMLPStructuredDataReader::SetupOutputData()
{
this->Superclass::SetupOutputData();
......
......@@ -45,6 +45,9 @@ public:
// called.
virtual vtkExtentTranslator* GetExtentTranslator();
// For the specified port, copy the information this reader sets up in
// SetupOutputInformation to outInfo
virtual void CopyOutputInformation(vtkInformation *outInfo, int port);
protected:
vtkXMLPStructuredDataReader();
~vtkXMLPStructuredDataReader();
......
......@@ -16,10 +16,12 @@
#include "vtkDataArray.h"
#include "vtkDataSet.h"
#include "vtkInformation.h"
#include "vtkStreamingDemandDrivenPipeline.h"
#include "vtkXMLDataElement.h"
#include "vtkXMLDataParser.h"
vtkCxxRevisionMacro(vtkXMLStructuredDataReader, "1.17");
vtkCxxRevisionMacro(vtkXMLStructuredDataReader, "1.18");
//----------------------------------------------------------------------------
vtkXMLStructuredDataReader::vtkXMLStructuredDataReader()
......@@ -75,6 +77,23 @@ int vtkXMLStructuredDataReader::ReadPrimaryElement(vtkXMLDataElement* ePrimary)
return this->Superclass::ReadPrimaryElement(ePrimary);
}
//----------------------------------------------------------------------------
void
vtkXMLStructuredDataReader::CopyOutputInformation(vtkInformation* outInfo,
int port)
{
// Let the superclass copy information first.
this->Superclass::CopyOutputInformation(outInfo, port);
// All structured data has a whole extent.
vtkInformation* localInfo = this->GetExecutive()->GetOutputInformation(port);
if(localInfo->Has(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()))
{
outInfo->CopyEntry(localInfo,
vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT());
}
}
//----------------------------------------------------------------------------
void vtkXMLStructuredDataReader::SetupEmptyOutput()
{
......
......@@ -50,6 +50,10 @@ public:
vtkGetMacro(WholeSlices, int);
vtkBooleanMacro(WholeSlices, int);
// Description:
// For the specified port, copy the information this reader sets up in
// SetupOutputInformation to outInfo
virtual void CopyOutputInformation(vtkInformation *outInfo, int port);
protected:
vtkXMLStructuredDataReader();
~vtkXMLStructuredDataReader();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment