Hi Daniela,<br><br>Is this the same problem in which you found <br>that the input DICOM series is only being <br>read as a 1-slice dataset ?<br><br>Please let us know,<br><br><br> Thanks<br><br><br> Luis<br><br>
<br><br>--------------------------------<br><div class="gmail_quote">On Tue, May 18, 2010 at 12:54 PM, Daniela Sacchetto <span dir="ltr"><<a href="mailto:danysunflower@hotmail.it">danysunflower@hotmail.it</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>
<br>Thanks.<br>
I tryed to do what you said me but now I've a new problem.... I wanted
to preserv the original x and y dimension of my image and only reslice
it; I've to use this resample filter with different images and so I
want a more general possible code.... so I try to do this:<br>
<br>
#include <itkImageIORegion.h> <br>
[...]<br>
<br>
InputImageType::Pointer image = reader->GetOutput();<br>
SizeType imageSize = image->GetLargestPossibleRegion().GetSize();<br>
<br>
but when I've this error:<div class="im"><br>
<br>
terminate called after throwing an instance of 'itk::ExceptionObject'<br>
what(): /usr/local/include/InsightToolkit/IO/itkImageFileWriter.txx:271:<br></div>
itk::ERROR: ImageFileWriter(0x8956220): Largest possible region does
not fully contain requested paste IO regionPaste IO region:
ImageIORegion (0xbfcc9ba8)<div class="im"><br>
Dimension: 3<br>
Index: 0 0 0 <br></div>
Size: 0 0 50 <br>
Largest possible region: ImageRegion (0xbfcc9c04)<div class="im"><br>
Dimension: 3<br>
Index: [0, 0, 0]<br></div>
Size: [0, 0, 50]<br>
<br>
Aborted<br>
<br>
Could someone help me to solve this problem?<br>
Thanks<br>
Daniela<br><hr>Date: Wed, 12 May 2010 07:47:28 -0400<br>Subject: Re: [Insight-users] ResampleFilter for 3D image<br>From: <a href="mailto:cquammen@cs.unc.edu" target="_blank">cquammen@cs.unc.edu</a><br>To: <a href="mailto:danysunflower@hotmail.it" target="_blank">danysunflower@hotmail.it</a><br>
CC: <a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a><div><div></div><div class="h5"><br><br><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't initialized. In the error, you can see that these dimensions have the values <span style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse;">3216878376 and </span><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 style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse;"><br></span></div><div><span style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse;">Thanks,</span></div>
<div><span style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse;">Cory</span></div><br><div>On Sun, May 9, 2010 at 6:22 AM, Daniela Sacchetto <span dir="ltr"><<a href="mailto:danysunflower@hotmail.it" target="_blank">danysunflower@hotmail.it</a>></span> wrote:<br>
<blockquote style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>
Hi everyone<br>I'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've this error:<br>
<br>-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
terminate called after throwing an instance of 'itk::ExceptionObject'<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't find my (propably stupid) error....<br><br>I add my wrong<img src="" alt="" width="19" height="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/%7Ecquammen" target="_blank">http://www.cs.unc.edu/~cquammen</a><br>
</div>                                            <br></div></div><hr>Un mondo di personalizzazioni <a href="http://www.pimpit.it/" target="_blank">per Messenger, PC e cellulare</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>