[Paraview] Difference between UPDATE_EXTENT and WHOLE_EXTENT and
when to set what
Mike Jackson
imikejackson at gmail.com
Fri Feb 8 16:11:16 EST 2008
I am _still_ trying to write a custom reader for ParaView. The reader
reads a bunch of data out of an HDF5 file and into a vtkImageData
object. The problem is that the actual data set could be 7446 x 8332
x 125 which is larger than most peoples desktop can handle. The
problem we are running into is our RequestData method is being called
multiple times.
Questions: When should I call the following:
outInfo->Set( vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), this-
>DataExtent, 6 );
outInfo->Set( vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), this-
>VOI, 6 );
and if I do call both, what should I _really_ be setting them to?
Assume DataExtent[6] = {0,7446,0,8332,0,125}
Assume VOI[6] = {0,1292, 0, 968, 0, 100, 102};
Now, in the RequestData() method we are initializing the output to:
requestedExtent[0] = (outInfo->Get
(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()))[0];
requestedExtent[1] = (outInfo->Get
(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()))[1];
requestedExtent[2] = (outInfo->Get
(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()))[2];
requestedExtent[3] = (outInfo->Get
(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()))[3];
requestedExtent[4] = (outInfo->Get
(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()))[4];
requestedExtent[5] = (outInfo->Get
(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()))[5];
output->SetScalarType(VTK_TYPE_UINT8);
output->SetSpacing(this->DataSpacing);
output->SetOrigin( 0.0, 0.0, 0.0);
output->SetDimensions(requestedExtent[1] + 1, requestedExtent[3] +
1, z + 1);
output->SetNumberOfScalarComponents( 1);
output->AllocateScalars();
output->GetPointData()->GetScalars()->SetName("RoboMet Voxels");
output->GetPointData()->SetActiveScalars("RoboMet Voxels");
Is this correct or what am I doing wrong? VOI can be set from the
ParaView Interface via an auto-generated panel.
Should I make the WHOLE_EXTENT really just the VOI? Problem there is
that VOI isn't being set until AFTER RequestInformation is being called.
Any help is appreciated.
--
Mike Jackson
imikejackson & gmail * com
More information about the ParaView
mailing list