[Paraview] Resampling data in ParaView

Berk Geveci berk.geveci at kitware.com
Fri Jun 4 08:50:13 EDT 2010


Hi Jerome,

> 2) to submit a patch to the VTK developers that modifies the current
> implementation

This is harder than you think. The current implementation is "broken"
for a good reason. I'll try to explain.

ParaView is first and foremost designed
for distributed memory parallel computing. Its main mode of operation
is data parallel: each process loads a subset of the whole mesh and
filters it, for the most part, in an embarrassingly parallel fashion. One of
the main bottlenecks (actually, THE main bottleneck) of distributed parallel
processing is IO. We want to minimize IO whenever possible. This
desire conflicts with the way structured data pipeline works by default.
The structured pipeline aims to always keep data load balanced. For
example, if I load a mesh, then extract a subset (with extract VOI) and
then contour it, the default VTK implementation will try to first split the
whole mesh into n (where n is the number of pieces) and then try to
split the output of extract VOI into n. Depending on what extract VOI
is extracting, the second partitioning may be different than the first,
causing processes to reload different parts of data.

To avoid this problem, ParaView uses a custom extent translator. However,
this extent translator was not designed with all image filters in mind.
Hence the problem you are seeing.

If you are running only in serial mode, the problem is easy to solve.
Change the ParaView code to use its extent translator only when running
in parallel. However, if you are running in parallel, you cannot do this.

I am working on making some changes to the VTK pipeline that will
hopefully address this issue in the future.

-berk



On Thu, Jun 3, 2010 at 5:48 PM, Jérôme <jerome.velut at gmail.com> wrote:
> Utkarsh,
>
> clear up a doubt for me please: Does it mean that if I want to use
> vtkImageConstantPad filter in ParaView, I only have two solutions
> that are
> 1) to write vtkPVImageConstantPad that uses the extent translator
> correctly,
> 2) to submit a patch to the VTK developers that modifies the current
> implementation
>
> Thanks again!
>
> Jerome
>
> 2010/6/3 Jérôme <jerome.velut at gmail.com>:
>> Fine!
>> Thanks a lot for your explanations. Then I will work on that.
>> Do you mind if I go on this thread for eventual misunderstandings?
>>
>> Jerome
>>
>> 2010/6/3 Utkarsh Ayachit <utkarsh.ayachit at kitware.com>:
>>> Jerome,
>>>
>>> The VTK class has the trick to override the extent-translator which is
>>> what does-what-it-does in ParaView. ParaView by default overrides the
>>> extent translator with vtkPVExtentTranslator which uses the original
>>> data exetent information for partitioning and that's what messes such
>>> fancy pipelines up. The filer can explicitly override ParaView's
>>> behavior. So to answer, no, there's nothing on ParaView side that
>>> needs to be added to support changing of extents it is in the
>>> pipeline.
>>>
>>> Utkarsh
>>>
>>> On Thu, Jun 3, 2010 at 2:24 PM, Jérôme <jerome.velut at gmail.com> wrote:
>>>> Hi Utkarsh,
>>>>
>>>> Thanks for your tips. I will take a look around this class. Though I have
>>>> a question: This is a VTK class, and I don't have problem in stand-alone
>>>> VTK applications. If I have to change something in VTK classes, it means
>>>> that I will have duplicated filters, the native VTK ones and the modified
>>>> of mine... Don't you think there something on ParaView-side to do?
>>>>
>>>> Thanks again and best regards,
>>>> Jerome
>>>>
>>>> 2010/6/3 Utkarsh Ayachit <utkarsh.ayachit at kitware.com>:
>>>>> Jerome,
>>>>>
>>>>> You may want to look at VTK/Hybrid/vtkImageDataLIC2D.cxx to see how it
>>>>> plays tricks with the extent-translator to generate images with larger
>>>>> extent when magnification > 1.
>>>>>
>>>>> Utkarsh
>>>>>
>>>>> On Thu, Jun 3, 2010 at 5:02 AM, Jérôme <jerome.velut at gmail.com> wrote:
>>>>>> Finally, I found a bug opened 6 months ago:
>>>>>>   http://www.paraview.org/Bug/view.php?id=10125
>>>>>> I added a note. I hope that it will interest some PV gurus
>>>>>>
>>>>>> Jerome
>>>>>>
>>>>>> 2010/6/2 Jérôme <jerome.velut at gmail.com>:
>>>>>>> Dear all,
>>>>>>>
>>>>>>> I fill very surprised that *nobody* has to resample some data inside
>>>>>>> ParaView. Several threads deal with enabling some VTK filters in
>>>>>>> ParaView that actually change the extent of the input image (just as
>>>>>>> vtkImageResample), but when the output extent is higher that input,
>>>>>>> there is a strange behaviour. Sorry for being lazy: the problem was
>>>>>>> described in the following threads.
>>>>>>>   http://www.paraview.org/pipermail/paraview/2010-May/017309.html
>>>>>>>   http://www.paraview.org/pipermail/paraview/2009-October/014306.html
>>>>>>>   http://www.paraview.org/pipermail/paraview/2009-April/011945.html
>>>>>>>
>>>>>>> Please, tell me if I am doing something wrong in the XML, if I am
>>>>>>> stupid, if this is a known limitation of ParaView, if I am not sending
>>>>>>> to the right mailing list, if [put your own proposition].
>>>>>>>
>>>>>>> Thanks for all, and best regards.
>>>>>>> Jerome
>>>>>>>
>>>>>>> PS: you can find the incriminated XML files here:
>>>>>>> http://github.com/jeromevelut/Peavip . Beware of the Spline Filter,
>>>>>>> another pending request has been sent.
>>>>>>>
>>>>>> _______________________________________________
>>>>>> 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
>>>>>>
>>>>>
>>>>
>>>
>>
> _______________________________________________
> 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