No subject
Fri Jan 14 08:05:08 EST 2011
; ">This means that when you use ImageAdaptors, you must make sure</span></=
div>
<div><span class=3D"Apple-style-span" style=3D"font-family: monospace; whit=
e-space: pre; font-size: medium; "></span><span class=3D"Apple-style-span" =
style=3D"font-family: monospace; white-space: pre; font-size: medium; ">tha=
t the filter receiving the Adaptor is based on the use of the</span></div>
<div><span class=3D"Apple-style-span" style=3D"font-family: monospace; whit=
e-space: pre; font-size: medium; "></span><span class=3D"Apple-style-span" =
style=3D"font-family: monospace; white-space: pre; font-size: medium; ">&qu=
ot;*WithIndex" iterators.</span><div>
<span class=3D"Apple-style-span" style=3D"font-family: 'Times New Roman=
'; font-size: medium; "><pre><span class=3D"Apple-style-span" style=3D"=
font-family: 'Times New Roman'; white-space: normal; "><pre></pre><=
/span></pre>
</span><div><div><a href=3D"http://www.itk.org/pipermail/insight-users/2005=
-April/012553.html"></a><br><br><div class=3D"gmail_quote">On Mon, Feb 21, =
2011 at 1:36 PM, Hsieh <span dir=3D"ltr"><<a href=3D"mailto:M.Hsieh at stud=
ent.tudelft.nl">M.Hsieh at student.tudelft.nl</a>></span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;"><div lang=3D"ZH-TW" link=3D"blue" vlink=3D"=
purple"><div><p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"color:bla=
ck">Hi,</span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"color:black">=A0</span=
></p><p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"color:black">Now =
I send it to Insight-Users mailing list.</span></p><p class=3D"MsoNormal"><=
span lang=3D"EN-US" style=3D"color:black">My purpose is to extract elements=
from the tensor image to analyze and register the tensor channels. With yo=
ur help now I can do so with vector image adaptor, which extracts one of th=
e element of the vector. However, in the example of ImageAdaptor3.cxx, the =
adaptor itself cannot directly be fed into the writer to create a scalar im=
age. It is shown that a filter, such as rescaling the intensity, has to be =
done and therefore the rescaler->GetOutput() can be set as the input ima=
ge for writer. Is there a way not to modify the intensity of the image? Is =
there an identity filter or something like that?</span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"color:black">=A0</span=
></p><p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"color:black">Best=
regards,</span></p><p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"co=
lor:black">Michael</span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"color:black">=A0</span=
></p><div style=3D"border:none;border-bottom:solid windowtext 1.0pt;padding=
:0cm 0cm 1.0pt 0cm"><p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"fo=
nt-size:8.5pt;color:black">=A0</span></p>
</div><p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:8.5pt;=
color:black">=A0</span></p><p class=3D"MsoNormal"><span lang=3D"EN-US" styl=
e=3D"font-size:8.5pt;color:black">This is more of a question for the Insigh=
t-Users mailing list.</span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:8.5pt;color:=
black">=A0</span></p><p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"f=
ont-size:8.5pt;color:black">That being said, you don't show your work, =
so I can't say exactly what you're doing wrong.</span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:8.5pt;color:=
black">=A0</span></p><p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"f=
ont-size:8.5pt;color:black">I wrote the NIfTI image reader, and as I rememb=
er there's some strange things that go on with respect to =A0Images wit=
h dimension > 3.</span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:8.5pt;color:=
black">=A0</span></p><p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"f=
ont-size:8.5pt;color:black">If I recall correctly, in a NIfTI image dimensi=
ons of [ 128 128 64 1 6 ] would not correspond to an 5D scalar image at all=
. =A0It would be a 3D image where each voxel is a 6-element vector. =A0The =
4th dimension is ALWAYS interpreted as a time dimension, and the sixth and =
subsequent dimensions are interpreted according to what the image modality =
actually was. =A0Most often, and what's implemented in the reader, is t=
o interpret it as an Image of Vector voxels. So NiftiImageIO reads in 6 3D =
volumes, and then constructs vector pixels by pulling one pixel from each o=
f the volumes.</span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:8.5pt;color:=
black">=A0</span></p><p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"f=
ont-size:8.5pt;color:black">In other words if you used</span></p><p class=
=3D"MsoNormal">
<span lang=3D"EN-US" style=3D"font-size:8.5pt;color:black">=A0</span></p><p=
class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:8.5pt;color:bl=
ack">typedef itk::Image< itk::Vector<float, 6>, 3 > ImageType;<=
/span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:8.5pt;color:=
black">typedef itk::ImageFileReader<Imagetype> ImageReaderType;</span=
></p><p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:8.5pt;c=
olor:black">=A0</span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:8.5pt;color:=
black">You would get all the data. =A0If you use</span></p><p class=3D"MsoN=
ormal"><span lang=3D"EN-US" style=3D"font-size:8.5pt;color:black">=A0</span=
></p><p class=3D"MsoNormal">
<span lang=3D"EN-US" style=3D"font-size:8.5pt;color:black">typedef itk::Ima=
ge<float, 3> ImageType;</span></p><p class=3D"MsoNormal"><span lang=
=3D"EN-US" style=3D"font-size:8.5pt;color:black">typedef itk::ImageFileRead=
er<ImageType> ImageReaderType;</span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:8.5pt;color:=
black">=A0</span></p><p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"f=
ont-size:8.5pt;color:black">the ImageFileReader will think that it's a =
vector image and try to convert the vector voxels to a scalar voxel, probab=
ly by taking the first value of each voxel's vector. =A0It will then re=
port the image size as you reported.</span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:8.5pt;color:=
black">=A0</span></p><p class=3D"MsoNormal"><b><span lang=3D"EN-US" style=
=3D"font-size:11.0pt;color:black">From: </span></b><span lang=3D"EN-US" sty=
le=3D"font-size:11.0pt;color:black">Hsieh <<a href=3D"mailto:M.Hsieh at stu=
dent.tudelft.nl" target=3D"_blank">M.Hsieh at student.tudelft.nl</a>><br>
<b>Date: </b>Fri, 18 Feb 2011 16:35:07 +0100<br><b>To: </b>ITK <<a href=
=3D"mailto:insight-developers at itk.org" target=3D"_blank">insight-developers=
@itk.org</a>><br><b>Subject: </b>[Insight-developers] Problem in reading=
5D nifti image</span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:8.5pt;color:=
black">=A0</span></p><p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"c=
olor:black">Hi, </span></p><p class=3D"MsoNormal"><span lang=3D"EN-US" styl=
e=3D"color:black">=A0</span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"color:black">I am tryi=
ng to read a diffusion tensor image in nifti(.nii) format, which has dimens=
ion of [128 128 64 1 6]. However, the image I got after read by the itkImag=
eFileReader.h had dimension only [128 128 64 1 1]. The last two dimension a=
re suppressed by the reader. When I looked into the class (.h) and the .txx=
file, I found out that the </span><span lang=3D"EN-US" style=3D"font-size:=
9.0pt;font-family:MingLiU;color:black">numberOfDimensionsIO</span><span lan=
g=3D"EN-US" style=3D"color:black">, which is 3,</span><span lang=3D"EN-US" =
style=3D"font-size:9.0pt;font-family:MingLiU;color:black"> </span><span lan=
g=3D"EN-US" style=3D"color:black">is smaller than</span><span lang=3D"EN-US=
" style=3D"font-size:9.0pt;font-family:MingLiU;color:black"> TOutputImage::=
ImageDimension</span><span lang=3D"EN-US" style=3D"color:black">, which is =
set manually to 5, so that the 4<sup>th</sup> and the 5<sup>th</sup> dimens=
ion are set to 1 later. Why does that happen? </span><span lang=3D"EN-US" s=
tyle=3D"font-size:9.0pt;font-family:MingLiU;color:black">numberOfDimensions=
IO</span><span lang=3D"EN-US" style=3D"color:black"> should be 5 in this ca=
se.</span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"color:black">=A0</span=
></p><p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"color:black">Best=
regards,</span></p><p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"co=
lor:black">Meng-Kang Hsieh (Michael)</span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"color:black">OpSciTech=
, Erasmus Mundus</span></p><p class=3D"MsoNormal"><span lang=3D"EN-US" styl=
e=3D"color:black">Delft University of Technology</span></p><p class=3D"MsoN=
ormal"><span lang=3D"EN-US">=A0</span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">=A0</span></p><p class=3D"MsoNo=
rmal"><span lang=3D"EN-US">Best regards,</span></p><p class=3D"MsoNormal"><=
span lang=3D"NL">Meng-Kang Hsieh (Michael)</span></p><p class=3D"MsoNormal"=
><span lang=3D"NL">OpSciTech, Erasmus Mundus</span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">Delft University of Technology<=
/span></p><p class=3D"MsoNormal"><span lang=3D"EN-US">=A0</span></p><p clas=
s=3D"MsoNormal"><span lang=3D"EN-US">=A0</span></p></div></div><br>________=
_____________________________<br>
Powered by <a href=3D"http://www.kitware.com" target=3D"_blank">www.kitware=
.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href=3D"http://www.kitware.com/opensource/opensource.html" target=3D"_bl=
ank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href=3D"http://www.kitware.com/products/protraining.html" target=3D"_bla=
nk">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href=3D"http://www.itk.org/Wiki/ITK_FAQ" target=3D"_blank">http://www.it=
k.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href=3D"http://www.itk.org/mailman/listinfo/insight-users" target=3D"_bl=
ank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br></div></div></div></div>
--20cf307cfef4675a0a049ccf8f17--
More information about the Insight-users
mailing list