<div>Daniela,</div><div><br></div>You commented out these lines<div><br></div><div><div>  //size[0] = 300;  // number of pixels along X</div><div>  //size[1] = 300;  // number of pixels along Y</div><div><br></div><div>As a result, the values in size[0] and size[1] aren&#39;t initialized. In the error, you can see that these dimensions have the values <span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">3216878376 and </span><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">138384173, which is surely much larger than the dimensions of your image. Please try uncommenting these lines and setting the image dimensions appropriately and report back what happens.</span></div>
<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><br></span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">Thanks,</span></div>
<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">Cory</span></div><br><div class="gmail_quote">On Sun, May 9, 2010 at 6:22 AM, Daniela Sacchetto <span dir="ltr">&lt;<a href="mailto:danysunflower@hotmail.it">danysunflower@hotmail.it</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">



<div>
Hi everyone<br>I&#39;m new in itk....so, sorry for my (maybe stupid) questions.<br><br>I have to resample a 3D US image (it is a 97 frames image and I want to reduce its frame-number to 50).<br>I tried to adapt ResampleImageFilter (Examples/Filtering/ResampleImageFilter.cxx.) for 3D image. I wanted to run it to see how that filter works but  I&#39;ve this error:<br>
<br>-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
terminate called after throwing an instance of &#39;itk::ExceptionObject&#39;<br>  what():  /usr/local/include/InsightToolkit/IO/itkImageFileWriter.txx:271:<br>itk::ERROR: ImageFileWriter(0x9bac220): Largest possible region does not fully contain requested paste IO regionPaste IO region: ImageIORegion (0xbfbda908)<br>
  Dimension: 3<br>  Index: 0 0 0 <br>  Size: 3216878376 138384173 50 <br>Largest possible region: ImageRegion (0xbfbda964)<br>  Dimension: 3<br>  Index: [0, 0, 0]<br>  Size: [3216878376, 138384173, 50]<br><br>Aborted<br>-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
<br>I think that my code is wrong but I don&#39;t find my (propably stupid) error....<br><br>I add my wrong<img alt="" height="19" width="19"> code to this mail...<br><br>Thanks all<br>Daniela<br>                                               <br><hr>Avatar per Messenger e sfondo per il PC <a href="http://www.experience.windows.com/landing2.aspx?culture=it-it" target="_blank">Creali gratis!</a></div>

<br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Cory Quammen<br>Center for Computer Integrated Systems for Microscopy and Manipulation (CISMM)<br>Department of Computer Science<br>University of North Carolina at Chapel Hill<br>
<a href="http://www.cs.unc.edu/~cquammen">http://www.cs.unc.edu/~cquammen</a><br>
</div>