[vtkusers] Need help urgently on vtkImageAppend

Pisupati, Preeti (CORP, GEITC) Preeti.Pisupati at geind.ge.com
Sat May 17 11:11:25 EDT 2003


Hi,
 
I'm trying to append the images from vtkImageShrink3D in a for loop as given below..
 
for ( i=0;  i<10; i+=2 )    // I am trying to shrink 10 slices to 5 slices and append them into one volume of 5 slices
  {
   .........
   ......created a reader object......
 
   reader->SetDataExtent(0,100,0,200,i,i+1);  // setting the extents of the reader to two slices i, i+1
   reader->UpdateInformation();
   reader->Update();
 
   vtkImageShrink3D *shrink=vtkImageShrink3D::New();
   shrink->SetInput(reader->GetOutput());
   shrink->SetShrinkFactors(2,2,2);    // Shrinking the input 2 slices by two.... Expecting an output of 1 slice
   shrink->SetAveraging(1);
   shrink->Update();
   
   imageAppend->AddInput(shrink->GetOutput());    // Adding the Output of Shrink3D to imageAppend....1 Slice each for 5 times
   imageAppend->SetAppendAxis(2);
   imageAppend->Update();
   
   reader->Delete();
   shrink->Delete();
  }
 
The problem here is that i am getting the extents of imageAppend object as (0, 50, 0, 100, 0, 8) instead of expected ( 0, 50 , 0, 100, 0, 4) 
 
Thanks in advance
Best regards
Preeti.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030517/14a02b67/attachment.htm>


More information about the vtkusers mailing list