<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.hmmessage P
{margin:0px;padding:0px;}
body.hmmessage
{font-size:10pt;font-family:Verdana;}
</style>
No, I tryed to resample a different 3D DICOM image.<br>Saturday afternoon ITK mailing list solved my problems with ResampleFilter: I didn't do the ''reader->Update()''before asking image's dimensions, so it was naturally that my code said me that it was a 0x0x0 image... ;-)<br>So, thanks a lot to Insight-users (expecially to
<span id="PresenceContainer">
<img id="P___464310358" webimdisplaystyle="inline" style="display: none;">
<b>Bill Lorensen</b></span>) that solved my problem with GetLargestPossibleRegion().GetSize()<br>Regards,<br>Daniela<br>
<br><br><hr id="stopSpelling">Date: Mon, 24 May 2010 13:26:15 -0400<br>Subject: Re: [Insight-users] ResampleFilter for 3D image<br>From: luis.ibanez@kitware.com<br>To: danysunflower@hotmail.it<br>CC: cquammen@cs.unc.edu; insight-users@itk.org<br><br>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="ecxgmail_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="ecxgmail_quote" style="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="ecxim"><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="ecxim"><br>
Dimension: 3<br>
Index: 0 0 0 <br></div>
Size: 0 0 50 <br>
Largest possible region: ImageRegion (0xbfcc9c04)<div class="ecxim"><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">cquammen@cs.unc.edu</a><br>To: <a href="mailto:danysunflower@hotmail.it">danysunflower@hotmail.it</a><br>
CC: <a href="mailto:insight-users@itk.org">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">danysunflower@hotmail.it</a>></span> wrote:<br>
<blockquote style="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="http://" 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">Creali gratis!</a></div>
<br>_____________________________________<br>
Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html">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">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">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">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">http://www.cs.unc.edu/~cquammen</a><br>
</div>                                            <br></div></div><hr>Un mondo di personalizzazioni <a href="http://www.pimpit.it/">per Messenger, PC e cellulare</a></div>
<br>_____________________________________<br>
Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html">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">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">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">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br>                                            <br /><hr />Messenger Radio. <a href='http://www.messenger.it/messenger_radio.aspx' target='_new'>La radio che si fa cliccare!</a></body>
</html>