[vtk-developers] First pass of VTK 6 migration guide posted

Pat Marion pat.marion at kitware.com
Thu Apr 12 17:07:19 EDT 2012


I ran into an issue while performing the migration described here:

http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Removal_of_Methods_for_Manipulating_Update_Extent

In VTK 5

void vtkDataObject::SetUpdateExtent(int piece, int numPieces, int
ghostLevel) executed:
{
   ...
    sddp->SetUpdateExtent
      (sddp->GetOutputInformation()->GetInformationObject
       (this->GetPortNumber()), piece, numPieces, ghostLevel);
   ...
}


In VTK 6

void vtkAlgorithm::SetUpdateExtent(int port, int connection,
                                   int piece,
                                   int numPieces,
                                   int ghostLevel)
{
  ...
    vtkStreamingDemandDrivenPipeline::SetUpdateExtent(
      this->GetInputInformation(port, connection),
      piece,
      numPieces,
      ghostLevel);
  ...
}


In VTK 5, the output information is used, in VTK 6, the input information
is used which results in incorrect behavior.


So I am now using code that looks like this:

  aFilter->UpdateInformation();
  vtkStreamingDemandDrivenPipeline::SetUpdateExtent(
      aFilter->GetOutputInformation(0),
      pieceIndex, numberOfPieces, ghostLevel);


Another question- is it by design that you must call UpdateInformation()
before SetUpdateExtent()?  If you fail to do so, the information set by
SetUpdateExtent() will be erased.  I have found that the actual requirement
is that you must call calling aFilter->GetOutputDataObject(0) which forces
a call to GetExecutive()->UpdateDataObject() to initialize the output
information.

Pat

On Thu, Apr 12, 2012 at 3:29 PM, Berk Geveci <berk.geveci at kitware.com>wrote:

> I don't have any objections to expanding this guide to include
> modularization as long as I am not asked to do it :-)
>
>
> On Tue, Apr 10, 2012 at 6:45 PM, Pat Marion <pat.marion at kitware.com>wrote:
>
>> With the recent merge of the new modular build system, I suppose we
>> should expand this guide to cover all the build system changes?  For
>> example, libraries have been renamed, python modules renamed, default
>> install directory has changed, the vtkstd namespace and headers are
>> removed...  is this wiki page the best place to accumulate these items?
>>
>> Pat
>>
>>
>> On Sat, Apr 7, 2012 at 6:41 PM, Andrew Maclean <andrew.amaclean at gmail.com
>> > wrote:
>>
>>>
>>> Hi Berk,
>>>
>>> On an initial read this looks pretty good.
>>>
>>> Regards
>>>    Andrew
>>>
>>>
>>>> ---------- Forwarded message ----------
>>>> From: Berk Geveci <berk.geveci at kitware.com>
>>>> To: VTK Developers <vtk-developers at vtk.org>, VTK Users <
>>>> vtkusers at vtk.org>
>>>> Cc:
>>>> Date: Fri, 6 Apr 2012 15:41:44 -0400
>>>> Subject: [vtk-developers] First pass of VTK 6 migration guide posted
>>>> http://www.vtk.org/Wiki/VTK/VTK_6_Migration_Guide
>>>>
>>>> Please send comments, fixed, questions etc.
>>>>
>>>> Best,
>>>> -berk
>>>>
>>>>
>>>>
>>>> --
>>> ___________________________________________
>>> Andrew J. P. Maclean
>>>
>>> ___________________________________________
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtk-developers
>>>
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20120412/1169aedb/attachment.html>


More information about the vtk-developers mailing list