[vtk-developers] Patch for VTK bug #3941

Dave Partyka dave.partyka at kitware.com
Tue Mar 23 15:56:54 EDT 2010


Fixed by the following patch from Berk: Thanks all for your patience.

diff --git a/VTK/Filtering/vtkTrivialProducer.cxx
b/VTK/Filtering/vtkTrivialProducer.cxx
index 10c20bf..80881bb 100644
--- a/VTK/Filtering/vtkTrivialProducer.cxx
+++ b/VTK/Filtering/vtkTrivialProducer.cxx
@@ -20,6 +20,7 @@
 #include "vtkInformation.h"
 #include "vtkInformationVector.h"
 #include "vtkObjectFactory.h"
+#include "vtkDataObject.h"

 vtkCxxRevisionMacro(vtkTrivialProducer, "$Revision$");
 vtkStandardNewMacro(vtkTrivialProducer);
@@ -148,6 +149,20 @@ vtkTrivialProducer::ProcessRequest(vtkInformation*
request,
       outputInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_STEPS(),
                       timeRange, 2);
       }
+
+ if (this->Output->IsA("vtkImageData"))
+ {
+ vtkImageData* img = static_cast<vtkImageData*>(this->Output);
+ vtkInformation* pinfo = img->GetPipelineInformation();
+
+ double spacing[3];
+ img->GetSpacing(spacing);
+ pinfo->Set(vtkDataObject::SPACING(), spacing[0], spacing[1], spacing[2]);
+
+ double origin[3];
+ img->GetOrigin(origin);
+ pinfo->Set(vtkDataObject::ORIGIN(), origin[0], origin[1], origin[2]);
+ }
     }
 #if VTK_TRIVIAL_PRODUCER_CHECK_UPDATE_EXTENT

if(request->Has(vtkStreamingDemandDrivenPipeline::REQUEST_UPDATE_EXTENT()))

Committed:

Committer: Dave Partyka <dave.partyka at kitware.com>
/cvsroot/ParaView3/ParaView3/VTK/Filtering/vtkTrivialProducer.cxx,v <--
Filtering/vtkTrivialProducer.cxx
new revision: 1.14; previous revision: 1.13


On Tue, Mar 23, 2010 at 11:05 AM, Dave Partyka <dave.partyka at kitware.com>wrote:

> I will go poke those responsible. Thanks!
>
> On Tue, Mar 23, 2010 at 11:01 AM, David Doria <daviddoria+vtk at gmail.com<daviddoria%2Bvtk at gmail.com>
> > wrote:
>
>> On Wed, Mar 17, 2010 at 2:16 PM, Dominique Belhachemi <
>> domibel at cs.tu-berlin.de> wrote:
>>
>>> Dear VTK developers,
>>>
>>> Please consider the attached patch to close bug #3941.
>>>
>>> I applied this patch to Debian's vtk package in May 2009. It works very
>>> well.
>>>
>>> Cheers
>>> Dominique
>>>
>>>
>> Guys,
>>
>> It seems too often that posts like this are ignored. If someone has taken
>> the time to fix a bug, it should either be committed, or some discussion
>> about why it cannot be committed should follow.
>>
>> David
>>
>> _______________________________________________
>> 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/20100323/7a060984/attachment.html>


More information about the vtk-developers mailing list