<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN
class=760435814-17052003><STRONG>Hi,</STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=760435814-17052003><STRONG></STRONG></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=760435814-17052003><STRONG>I'm trying
to append the images from vtkImageShrink3D in a for loop as given
below..</STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=760435814-17052003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=760435814-17052003>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<BR> {<BR> .........</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=760435814-17052003>
......created a reader object......</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=760435814-17052003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=760435814-17052003> reader->SetDataExtent(0,100,0,200,i,i+1);
<STRONG>// setting the extents of the reader to two slices i,
i+1</STRONG><BR> reader->UpdateInformation();<BR> reader->Update();</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=760435814-17052003> vtkImageShrink3D
*shrink=vtkImageShrink3D::New();<BR> shrink->SetInput(reader->GetOutput());<BR> shrink->SetShrinkFactors(2,2,2);
<STRONG>// Shrinking the input 2 slices by two.... Expecting an
output of 1
slice<BR></STRONG> shrink->SetAveraging(1);<BR> shrink->Update();</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=760435814-17052003> <BR> imageAppend->AddInput(shrink->GetOutput());
<STRONG>// Adding the Output of Shrink3D to imageAppend....1 Slice each for 5
times<BR></STRONG> imageAppend->SetAppendAxis(2);<BR> imageAppend->Update();</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=760435814-17052003> </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=760435814-17052003>
reader->Delete();</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=760435814-17052003> shrink->Delete();<BR> }</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=760435814-17052003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=760435814-17052003><STRONG>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) </STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=760435814-17052003><STRONG></STRONG></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=760435814-17052003><STRONG>Thanks in
advance</STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=760435814-17052003><STRONG>Best
regards</STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=760435814-17052003><STRONG>Preeti.</STRONG></SPAN></FONT></DIV></BODY></HTML>