[Paraview] Extents different down the pipeline - Why?

Michael Jackson mike.jackson at bluequartz.net
Wed Jan 27 16:18:03 EST 2010


Never Mind. Had a hard coded dimension deep down in the code. Copy-n- 
Paste will get you every time.
___________________________________________________________
Mike Jackson                      www.bluequartz.net
Principal Software Engineer       mike.jackson at bluequartz.net
BlueQuartz Software               Dayton, Ohio


On Jan 27, 2010, at 3:48 PM, Michael Jackson wrote:

> In developing a Filter that takes a MultiBlockDataset as input I am  
> having some issues with the extents that the pipeline gives versus  
> the extents that the data sets within the Input MultiBlockDataset.  
> The output from the filter is a vtkImageData object.
>
> The datasets within the MultiBlockDataset all have extents of 0-188,  
> 0-200, 0-0, yet if I have the following code:
>
> vtkTypeInt32 updateExtent [ 6 ];
> if (outInfo->Has(vtkStreamingDemandDrivenPipeline::UPDATE_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 ];
> }
>
> I get "0 188 0 200 1 1" as the values for the "updateExtents"  
> variable. This then plays havoc as I am trying to get the pointer to  
> the front of each data set like this:
>
> float* phiF = static_cast<float*>(phi- 
> >GetScalarPointer(updateExtent[0], updateExtent[2],  
> updateExtent[4]) );
> which then gives the error:
>
> ERROR: In /Users/Shared/OpenSource/ParaView3/VTK/Filtering/ 
> vtkImageData.cxx, line 1473
> vtkImageData (0x22fb32b0): GetScalarPointer: Pixel (0, 0, 0) not in  
> memory.
> Current extent= (0, 188, 0, 200, 1, 1)
>
> For this filter I do NOT have a RequestInformation() method. I tried  
> adding one and setting the outInfo- 
> >Set( vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), extents,  
> 6 ); but that didn't help and in fact set the pipeline extents to 0,  
> -1, 0, -1, 0, -1 instead.
>
> I think my "Reader" class further up the pipeline might be setting  
> something wrong? as I can use this filter from another "Reader" that  
> reads the same type of data, but from an HDF5 file instead and the  
> filter performs as expected. Or it is just lucky somehow and works.
>
> Any insights would be most appreciated.
>
> This is with ParaView 3.6.2 running on OS X and Windows 7.
> ___________________________________________________________
> Mike Jackson                      www.bluequartz.net
> Principal Software Engineer       mike.jackson at bluequartz.net
> BlueQuartz Software               Dayton, Ohio
>
>



More information about the ParaView mailing list