<!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 6.00.2800.1522" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2> Dear all,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have got a problem with resampling images, I am
using ITK2.2.0.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have got a 3D data (slices based on coronal
orientation) with space (1, 1, 5), I am trying to crop the 3D data in a
series of 2D slices in other orientations, axial and sagittal, so I have to
resample the image with a space (1,5) into (1,1) to display in png format. The
extract filter from 3D to 2D works well, I can get correct images without
resampling, but I can only get blank images when resampling the output images of
the extract filter to the the physical space.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I would be very grateful if anyone can help me
solve the problem.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Kind regards,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Yan</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>//-------------------------------------------------------------------------------------------------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> for(i=0; i<inputRegion.GetSize()[1];
i++)<BR> {<BR> inputStart[1] =
i;<BR> desiredRegion.SetIndex(
inputStart);<BR> extractFilter->SetExtractionRegion( desiredRegion
);<BR> resampleSliceFilter->SetInput(
extractFilter->GetOutput()
);<BR> resampleSliceFilter->Update();<BR> extractFilter->Update();<BR> sprintf(axialFilename,
"..\\Results\\checkerboard\\Axial\\Axial%03d.png",
inputStart[1]+1);<BR> seriesWriter->SetInput(
resampleSliceFilter->GetOutput() ); // if this line is
subtituted by "seriesWriter->SetInput( extractFilter->GetOutput() );", it
works.<BR> seriesWriter->SetFileName( axialFilename
);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial
size=2> try<BR> {<BR> seriesWriter->Update();<BR> }<BR> catch(
itk::ExceptionObject & err )<BR> {<BR> std::cout
<< "ExceptionObject caught !" <<
std::endl;<BR> std::cout << err <<
std::endl;<BR> }<BR> }</FONT></DIV></BODY></HTML>