[Paraview] Need help with UpdateExtents and RequestedExtents

Mike Jackson mike.jackson at bluequartz.net
Mon Jul 6 08:18:34 EDT 2009


Awesome. That did the trick. Just a few outstanding issues left and
this plugin will be nicely updated. Again, thanks for the info.

Mike Jackson

On Sun, Jul 5, 2009 at 8:08 PM, Burlen<burlen.loring at gmail.com> wrote:
>
>>  How do I tell the pipeline that the user is requesting a smaller
>> sub-volume? Are there some special variables I can use? or something
>> along those lines?
>
> Set WHOLE_EXTENT to your desired subset during in RequestInformation. Honor
> UPDATE_EXTENT in your RequestData pass. It will all work out.
>
> RequestInformation runs every time after user clicks apply in ParaView so
> what ever values they choose will be passed into the pipeline each time.
>
>
> Mike Jackson wrote:
>>
>> I am trying to update a previous ParaView plugin and I am running into
>> some trouble with the UpdateExtents and RequestedExtents. My problem
>> is that when my plugin runs the RequestInformation iI read from the
>> file to extract the origin, spacing and extent information. I then set
>> them into the pipeline as such:
>>
>> outInfo->Set( vtkDataObject::ORIGIN(), origin, 3 );
>> outInfo->Set( vtkDataObject::SPACING(), this->CurrentScalingFactor, 3 );
>> outInfo->Set( vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),
>> this->PixelActual, 6 );
>>
>> That all seems to work fine. My plugin loads up a custom gui to allow
>> the user to select a sub-volume to actually render as the volume is
>> quite large and can not be rendered in 32 bit clients or even some 64
>> bit clients for that matter.
>>
>> So I have the Custom plugin GUI talking to my custom reader so that
>> values entered into the GUI are available during the RequestData()
>> method of my reader class. Now here is the fun:
>>
>>  This code:
>>
>> vtkInformation* outInfo = outputVector->GetInformationObject(0);
>> vtkImageData* output =
>> vtkImageData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
>> vtkTypeInt32 updateExtent[6];
>> if (outInfo->Has(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()))
>> {
>> // Get the requested data extent.
>> updateExtent[0] =
>> (outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()))[0];
>> updateExtent[1] =
>> (outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()))[1];
>> updateExtent[2] =
>> (outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()))[2];
>> updateExtent[3] =
>> (outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()))[3];
>> updateExtent[4] =
>> (outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()))[4];
>> updateExtent[5] =
>> (outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()))[5];
>> }
>>
>> will always return the entire volume space which I guess I can
>> understand as that is what I put into those values during the
>> RequestInformation. I was merrily just using the values that get
>> pushed into my class via the custom GUI text fields. These values will
>> differ from the UPDATE_EXTENT. I setup the output with the smaller
>> extents and now my "RequestData()" is executed at least twice. I have
>> seen this before and have no idea what I do to solve it.'
>>
>>  How do I tell the pipeline that the user is requesting a smaller
>> sub-volume? Are there some special variables I can use? or something
>> along those lines?
>>
>>
>>   Also during the copying of the data from the file into the
>> vtkImageData object I get any number of errors:
>>
>> Warning: In /Users/Shared/OpenSource/vtk-5.4.2/Filtering/vtkDataSet.cxx,
>> line 414
>> vtkImageData (0x353d380): Point array RoboMet Voxels with 1
>> components, has 0 tuples but there are only -208926896 points
>>
>> Here are some stats about what I am trying to produce:
>>
>> MicronVOI: 46979.1 47526.7 48347.6 49080.1 492 495.2
>> MicronActual: 46979.1 48525.1 48347.6 50078.9 490 510
>> Requested Extent: 0 7440 0 8330 490 510
>> PixelActual: 0 7440 0 8330 490 510
>> PixelVOI: 0 2631 0 3520 0 3
>> dims: 2632 3521 4
>>
>> All that seems correct and the data seems to copy from the file into
>> the array but then I get the error above and ParaView will just crash.
>>
>> This is all with PV CVS, OS X intel 10.5.7, Xcode 3.1.3 tooling, cmake
>> 2.6.4 and GCC 4.2 compiler.
>>
>>
>> Any help is appreciated.
>> Mike Jackson
>> BlueQuartz Software  | www.bluequartz.net
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ParaView Wiki at:
>> http://paraview.org/Wiki/ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.paraview.org/mailman/listinfo/paraview
>>
>
>


More information about the ParaView mailing list