[vtkusers] extent, spacing and origin propagation problem through filters
Matei MANCAS
matei.mancas at tcts.fpms.ac.be
Fri Apr 4 06:30:39 EST 2003
Hi, all!
I thought that if first I have a ImageData having some extent, spacing, etc and than if I applay a filter on it, I will keep the same extent and spacing... But it seems to be wrong!
I have the following example :
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...
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)
This problem seems to be common to all vtkImageToImageFilter, so I would really need help on this subject : I would want to apply to a vtkImageData one or more filters before rendering it.
I really thanks you a lot for your help!!!
Matei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030404/699af77a/attachment.htm>
More information about the vtkusers
mailing list