[vtkusers] extent, spacing and origin propagation problem through filters

Charl P. Botha c.p.botha at its.tudelft.nl
Fri Apr 4 15:50:45 EST 2003


On Fri, Apr 04, 2003 at 01:30:39PM +0200, Matei MANCAS wrote:
>   int a,z,e,r,t,y;
>   data->VolReader->GetExtent(a,z,e,r,t,y);                                 //here I have the good Z extent (0 100) (VolReader is a vtkImageData)
>  
>   vtkImageShiftScale *my_shift = vtkImageShiftScale::New();         //a filter  
>              my_shift->SetInput(data->VolReader);
>              my_shift->SetScale(my_shift->GetScale()/256.0);
>              my_shift->SetOutputScalarTypeToUnsignedChar();
>  
> data->VolReader=my_shift->GetOutput();                                       // I have the same bad results using DeepCopy method...
>  

What results do you get if you call my_shift->Update() BEFORE you do the
following calls to GetExtent()?

> data->VolReader->GetExtent(a,z,e,r,t,y);                                     //here I have a bad Z extent (0 -1)
> 
>  my_shift->GetOutput()->GetExtent(a,z,e,r,t,y);                            //here I have a bad Z extent too : (0 -1)
>  my_shift->GetInput()->GetExtent(a,z,e,r,t,y);                            //here I have the good Z extent (0 100)

-- 
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/



More information about the vtkusers mailing list