<div>Gabriele,</div>
<div> </div>
<div>In many file formats, the "origin" is stored in the header of the file. The various ImageIO classes set the origin appropriately if origin is stored in the header. I'm not sure if Analyze stores an origin. If it does, then itkAnalyzeImageIO has a bug that needs top be fixed.
</div>
<div> </div>
<div>Bill<br><br></div>
<div class="gmail_quote">On Dec 14, 2007 11:13 AM, gabri <<a href="mailto:tartuz@gmail.com">tartuz@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi Bill,<br>if AnalyzeImageIO does not set the origin ... what the command<br> virtual void SetOrigin<br><
<a href="http://www.itk.org/Insight/Doxygen/html/classitk_1_1ImageIOBase.html#itk_1_1VTKImageIOz1867_1" target="_blank">http://www.itk.org/Insight/Doxygen/html/classitk_1_1ImageIOBase.html#itk_1_1VTKImageIOz1867_1</a>>
<br>(unsigned int i, double origin)<br>do?<br>I'm not sure that the problem is in the format maybe I read in a bad way<br>the input image...<br>Have I need to set AnalyzeImageIO also in the ImageFileReader to get it<br>
work properly?<br><br>best reguards,<br>gabriele<br><br>Bill Lorensen ha scritto:<br>
<div class="Ih2E3d">> Gabriele,<br>><br>> itkAnalyzeImageIO does not set the origin. I'm not sure if Analyze<br>> stores this information. Perhaps Hans Johnson can comment.<br>><br>> Bill<br>><br>
> On Dec 14, 2007 10:38 AM, gabri < <a href="mailto:tartuz@gmail.com">tartuz@gmail.com</a><br></div>
<div class="Ih2E3d">> <mailto:<a href="mailto:tartuz@gmail.com">tartuz@gmail.com</a>>> wrote:<br>><br>> Hi all,<br>> I've noticed something strange with the GetOrigin.<br>> My Images are of Analyze type (hdr+img) files and i can read then
<br>> correctly but after the registration process stops I need to write<br>> down<br>> the result images so, using the resampleImageFilter I apply the<br>> transform, setted via resampler->SetTranform() .
<br>> I need also that the spacing and origin informations have to be<br>> conserved so i thought that using resampler->SetOutputOrigin() and<br>> SetOutputSpacing() this will be done succesfully but this is not real
<br>> infact if I open the input images , using MRICRO, spacing is<br>> conserved<br>> but origin is setted in the OutputImages to [0,0,0]that is not<br>> correct.<br>><br>> the problem seems to be also in the ImageFileReader infact if I print
<br>> out the result of fixedImageReader->GetOutput()->GetOrigin() the<br>> values<br>> are still wrongly setted to all zeros .<br>><br>> This happens for all images that I have .<br>>
<br>> Any suggestions?<br>><br>> Sincerly,<br>> Gabriele<br>><br>><br>> _______________________________________________<br>> Insight-users mailing list<br></div>> <a href="mailto:Insight-users@itk.org">
Insight-users@itk.org</a> <mailto:<a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a>><br>
<div>
<div></div>
<div class="Wj3C7c">> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>><br>><br><br><br></div></div></blockquote></div><br>