<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV>Hi;</DIV>
<DIV>I would like to write registration result to ths folder,I searched through the internet but I have not seen any example like that. Here is my code ,in fact I am not an expert of ITK So I want you to check following code for me. Is that true?I integrated that code to my project but I did not get any result. On the other hand When I compile it, compiler says no any error?</DIV>
<DIV> </DIV>
<DIV>Please Check that code for me;</DIV>
<DIV> </DIV>
<DIV><FONT size=2>
<P><FONT size=3>transform->SetParameters( finalParameters );</FONT></P>
<P><FONT size=3> </FONT></P>
<P><FONT size=3>TransformType::Pointer finalTransform = TransformType::New();</FONT></P>
<P><FONT size=3>finalTransform->SetParameters( finalParameters );</FONT></P>
<P></FONT><FONT color=#0000ff>typedef</FONT> <FONT color=#0000ff>unsigned</FONT> <FONT color=#0000ff>short</FONT> OutputPixelType;</P><FONT color=#008000>
<P>// typedef itk::Image< MovingImageType, Dimension > MovingImageType;</P></FONT>
<P><FONT color=#0000ff>typedef</FONT> itk::Image< OutputPixelType, Dimension > OutputImageType;</P>
<P></P>
<P><FONT color=#0000ff>typedef</FONT> itk::ResampleImageFilter<MovingImageType,OutputImageType> FilterType;</P>
<P>FilterType::Pointer resample = FilterType::New();</P>
<P>resample->SetTransform( finalTransform );</P>
<P>resample->SetInput( input );</P>
<P></P>
<P><FONT color=#008000>// defining spacing, origin and size (The parameters of the output image are taken from the input image.)</P></FONT>
<P><FONT color=#0000ff>const</FONT> MovingImageType::SpacingType&</P>
<P>spacing = input->GetSpacing();</P>
<P><FONT color=#0000ff>const</FONT> MovingImageType::PointType&</P>
<P>origin = input->GetOrigin();</P>
<P>MovingImageType::SizeType size = </P>
<P>input->GetLargestPossibleRegion().GetSize();</P>
<P>resample->SetOutputOrigin( origin );</P>
<P>resample->SetOutputSpacing( spacing );</P>
<P>resample->SetSize( size );</P>
<P><FONT color=#0000ff>typedef</FONT> itk::Image< OutputPixelType, Dimension > OutputImageType; </P>
<P><FONT color=#0000ff>typedef</FONT> itk::ImageFileWriter< OutputImageType > WriterType;</P>
<P>WriterType::Pointer writer = WriterType::New();</P>
<P>writer->SetFileName(<FONT color=#800000>"result_of_registration.mhd"</FONT><FONT size=2><FONT size=3>); // <FONT color=#ff0000>Here I set the file name</FONT></FONT></P>
<P><FONT size=3>writer->SetInput( resample->GetOutput());</FONT></P>
<P><FONT size=3>writer->Update();</FONT></P></FONT></DIV></div><br>
<hr size=1>Be a PS3 game guru.<br>Get your game face on with <a href="http://us.rd.yahoo.com/evt=49936/*http://videogames.yahoo.com">the latest PS3 news and previews at Yahoo! Games.</a></body></html>