<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Bookman Old Style">Hi, </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Bookman Old Style">You can do it
as follow,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT
face="Bookman Old Style">this->resampler->SetInput(this->inImage);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT
face="Bookman Old Style"> this->transform->SetIdentity();</FONT></DIV>
<DIV><FONT
face="Bookman Old Style"><BR> this->resampler->SetTransform(this->transform);</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">//Note that the interpolator is
NearestNeighborInterpolateImageFunction</FONT></DIV>
<DIV><FONT
face="Bookman Old Style"> this->resampler->SetInterpolator(this->interpolator);</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT
face="Bookman Old Style"> this->resampler->SetOutputOrigin(this->inImage->GetOrigin());</FONT></DIV>
<DIV> </DIV>
<DIV><FONT
face="Bookman Old Style"> this->resampler->SetDefaultPixelValue( 0
);</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT
face="Bookman Old Style"> this->resampler->SetOutputSpacing( spacing
);//resampled spacing 1.25x1.0x1.0</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style"> this->resampler->SetSize( size
);//resampled size 160x256x256</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">//if the resampled size is change
you need to use this->UpdateLargestPossibleRegion()</FONT></DIV>
<DIV><FONT face="Bookman Old Style"> this->Update();</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style"> </FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">Regards,</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">Yixun Liu</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">Hello,<BR> <BR> I have a
3D binary image of size 80x128x128 and spacing 0.5x0.5x0.5mm. I need to resample
the image to get size 160x256x256 with spacing 1.25x1.0x1.0. Does somebody know
how to go about it? Appreciate it.<BR> <BR> Shahab</DIV>
<DIV><BR></DIV>
<DIV><BR></DIV></FONT></BODY></HTML>