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

Matei MANCAS matei.mancas at tcts.fpms.ac.be
Mon Apr 7 02:53:09 EDT 2003


Thanks!

It was the secret! I did some upadates on all objects but not on the filter,
so when I did it it worked well!
If one want to compute a filter and not to put it immediatly in a viewer,
one must do a filter->Update()!!!!

So, thank you Charl!


Matei

----- Original Message -----
From: "Charl P. Botha" <c.p.botha at its.tudelft.nl>
To: <vtkusers at public.kitware.com>
Sent: Friday, April 04, 2003 10:50 PM
Subject: Re: [vtkusers] extent, spacing and origin propagation problem
through filters


> 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/
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list