No subject
Wed May 9 12:08:04 EDT 2012
not defined and defaults to VECTOR.
Read function:
case nrrdKindHSVColor:
case nrrdKindXYZColor:
case nrrdKindQuaternion:
case nrrdKind2DSymMatrix:
case nrrdKind2DMaskedSymMatrix:
case nrrdKind2DMatrix:
case nrrdKind2DMaskedMatrix:
case nrrdKind3DMatrix:
// for all other Nrrd kinds, we punt and call it a vector
this->SetPixelType<http://www.orfeo-toolbox.org/doxygen/classitk_1_1ImageI=
OBase.html#a885bce93c88376980aa19ad8f23ba683>(
ImageIOBase::VECTOR<http://www.orfeo-toolbox.org/doxygen/classitk_1_1ImageI=
OBase.html#abd189f096c2a1b3ea559bc3e4849f658ab3ad7f87424e8849d2f11012f6e167=
93>);
this->SetNumberOfComponents<http://www.orfeo-toolbox.org/doxygen/classitk_=
1_1ImageIOBase.html#a2ee77061a748bee3b772c4346a486fbb>
(size);
break;
Write function (no case for MATRIX):
case ImageIOBase::VECTOR<http://www.orfeo-toolbox.org/doxygen/classitk_1_1I=
mageIOBase.html#abd189f096c2a1b3ea559bc3e4849f658ab3ad7f87424e8849d2f11012f=
6e16793>:
case ImageIOBase::OFFSET<http://www.orfeo-toolbox.org/doxygen/classitk_1_1I=
mageIOBase.html#abd189f096c2a1b3ea559bc3e4849f658a71cce79d8dbb0db0202045bf4=
6f2707a>:
// HEY is this right?
case ImageIOBase::FIXEDARRAY<http://www.orfeo-toolbox.org/doxygen/classitk_=
1_1ImageIOBase.html#abd189f096c2a1b3ea559bc3e4849f658abb242ae73052e7f58ddcc=
a20478e69a9>:
// HEY is this right?
default:
kind[0] =3D nrrdKindVector;
break;
On Thu, Oct 11, 2012 at 2:09 PM, Ariel Hern=E1n Curiale <curiale at gmail.com>=
wrote:
> I found in the header of the images that have the same type of kinds
> (kinds: vector domain domain ). I can read both images but I need to for=
ce
> the type (Vector or Matrix).
> According to the .nrrd definition the kinds of the image (Matrix) must no=
t
> be a matrix ?
>
> Saludos
> __________________________________
> | Ariel Hern=E1n Curiale Ph.D Student
> | ETSI Telecomunicaci=F3n
> | Universidad de Valladolid
> | Campus Miguel Delibes
> | 47011 Valladolid, Spain
> | Phone: 983-423000 ext. 5590
> | Web: www.curiale.com.ar
> |_________________________________
>
> El 11/10/2012, a las 18:19, Ariel Hern=E1n Curiale escribi=F3:
>
> Anyone know what I'm doing wrong ?
>
> __________________________________
> | Ariel Hern=E1n Curiale Ph.D Student
> | ETSI Telecomunicaci=F3n
> | Universidad de Valladolid
> | Campus Miguel Delibes
> | 47011 Valladolid, Spain
> | Phone: 983-423000 ext. 5590
> | Web: www.curiale.com.ar
> |_________________________________
>
> El 11/10/2012, a las 18:05, Ariel Hern=E1n Curiale escribi=F3:
>
> Hi,
>
> I'm trying to detect if the PixelType of an image is a Vector or a Matri=
x
> with this code:
>
> itk::ImageIOBase::Pointer fieldIO;
> itk::ImageIOBase::IOPixelType pixelType;
> fieldIO =3D itk::ImageIOFactory::CreateImageIO(fieldPathFile.c_str(),
> itk::ImageIOFactory::ReadMode);
> fieldIO->SetFileName("field.nrrd");
> fieldIO->ReadImageInformation();
> pixelType =3D fieldIO->GetPixelType();
>
> switch(pixelType)
> {
> case itk::ImageIOBase::MATRIX:
> std::cout<<"Matrix....."<<std::endl;
> break;
> case itk::ImageIOBase::VECTOR:
> std::cout<<"Vector....."<<std::endl;
> break;
> default:
> std::cerr << "PixelType unsupported." << std::endl;
> return EXIT_FAILURE;
> }
>
>
>
> The field.nrrd was write using this code:
>
> 1) Vector:
> typedef itk::Image< itk::Vector<float,3>,3> DeformationFieldType;
> typedef itk::ImageFileWriter<DeformationFieldType> FieldWriterType;
> typename FieldWriterType::Pointer fieldWriter =3D
> FieldWriterType::New();
> fieldWriter->SetInput(deformationField);
> fieldWriter->SetFileName("fieldVector.nrrd");
> fieldWriter->Update();
>
> 2) Matrix:
> typedef itk::Matrix< double, 2, 2 > TensorPixelType;
> typedef itk::Image<TensorPixelType, 2> StrainImageType;
> typedef itk::ImageFileWriter<typename StrainFilterType::OutputImageType>
> FieldWriterType;
> typename FieldWriterType::Pointer fieldWriter =3D
> FieldWriterType::New();
> fieldWriter->SetInput(strainFilter->GetStrainTensor());
> fieldWriter->SetFileName("fieldMatrx.nrrd");
> fieldWriter->Update();
>
>
> But in both case the pixelType is itk::ImageIOBase::VECTOR.
>
> What I'm doing wrong ?
>
> Thanks
> __________________________________
> | Ariel Hern=E1n Curiale Ph.D Student
> | ETSI Telecomunicaci=F3n
> | Universidad de Valladolid
> | Campus Miguel Delibes
> | 47011 Valladolid, Spain
> | Phone: 983-423000 ext. 5590
> | Web: www.curiale.com.ar
> |_________________________________
>
>
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
--=20
robert
--20cf30207fc402155504cbce38ac
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
According to the Wiki (<a href=3D"http://www.itk.org/Wiki/ITK/File_Formats"=
>http://www.itk.org/Wiki/ITK/File_Formats</a>) the NRRD imageIO should supp=
ort itk::ImageIOBase::MATRIX. <br><br>From the source of NrrdImageIO, it ap=
pears that itk::ImageIOBase::MATRIX is not defined and defaults to VECTOR.<=
br>
<br><br>Read function:<br><span class=3D"lineno"></span><span class=3D"keyw=
ordflow">case</span> nrrdKindHSVColor:
<div class=3D"line"><a name=3D"l00392"></a><span class=3D"lineno"></span><s=
pan class=3D"keywordflow">case</span> nrrdKindXYZColor:</div>
<div class=3D"line"><a name=3D"l00393"></a><span class=3D"lineno"></span><s=
pan class=3D"keywordflow">case</span> nrrdKindQuaternion:</div>
<div class=3D"line"><a name=3D"l00394"></a><span class=3D"lineno"></span><s=
pan class=3D"keywordflow">case</span> nrrdKind2DSymMatrix:</div>
<div class=3D"line"><a name=3D"l00395"></a><span class=3D"lineno"></span><s=
pan class=3D"keywordflow">case</span> nrrdKind2DMaskedSymMatrix:</div>
<div class=3D"line"><a name=3D"l00396"></a><span class=3D"lineno"></span><s=
pan class=3D"keywordflow">case</span> nrrdKind2DMatrix:</div>
<div class=3D"line"><span class=3D"keywordflow">case</span> nrrdKind2DMaske=
dMatrix:</div>
<div class=3D"line"><a name=3D"l00398"></a><span class=3D"lineno"></span><s=
pan class=3D"keywordflow">case</span> nrrdKind3DMatrix:</div>
<div class=3D"line"><span class=3D"comment">// for all other Nrrd kinds, we=
punt and call it a vector</span></div>
<div class=3D"line"><a name=3D"l00400"></a><span class=3D"lineno"> t</span>=
his-><a class=3D"code" href=3D"http://www.orfeo-toolbox.org/doxygen/clas=
sitk_1_1ImageIOBase.html#a885bce93c88376980aa19ad8f23ba683">SetPixelType</a=
>( <a class=3D"code" href=3D"http://www.orfeo-toolbox.org/doxygen/classitk_=
1_1ImageIOBase.html#abd189f096c2a1b3ea559bc3e4849f658ab3ad7f87424e8849d2f11=
012f6e16793">ImageIOBase::VECTOR</a> );</div>
<div class=3D"line"><a name=3D"l00401"></a><span class=3D"lineno"> </span>t=
his-><a class=3D"code" href=3D"http://www.orfeo-toolbox.org/doxygen/clas=
sitk_1_1ImageIOBase.html#a2ee77061a748bee3b772c4346a486fbb">SetNumberOfComp=
onents</a>(size);</div>
<div class=3D"line"><span class=3D"lineno"></span><span class=3D"keywordflo=
w">break</span>;</div><br>Write function (no case for MATRIX):<br><span cla=
ss=3D"lineno"></span><span class=3D"keywordflow">case</span> <a class=3D"co=
de" href=3D"http://www.orfeo-toolbox.org/doxygen/classitk_1_1ImageIOBase.ht=
ml#abd189f096c2a1b3ea559bc3e4849f658ab3ad7f87424e8849d2f11012f6e16793">Imag=
eIOBase::VECTOR</a>:
<div class=3D"line"><a name=3D"l00909"></a><span class=3D"lineno"></span><s=
pan class=3D"keywordflow">case</span> <a class=3D"code" href=3D"http://www.=
orfeo-toolbox.org/doxygen/classitk_1_1ImageIOBase.html#abd189f096c2a1b3ea55=
9bc3e4849f658a71cce79d8dbb0db0202045bf46f2707a">ImageIOBase::OFFSET</a>: =
<span class=3D"comment">// HEY is this right?</span></div>
<div class=3D"line"><a name=3D"l00910"></a><span class=3D"lineno"></span><s=
pan class=3D"keywordflow">case</span> <a class=3D"code" href=3D"http://www.=
orfeo-toolbox.org/doxygen/classitk_1_1ImageIOBase.html#abd189f096c2a1b3ea55=
9bc3e4849f658abb242ae73052e7f58ddcca20478e69a9">ImageIOBase::FIXEDARRAY</a>=
: <span class=3D"comment">// HEY is this right?</span></div>
<div class=3D"line"><a name=3D"l00911"></a><span class=3D"lineno"></span><s=
pan class=3D"keywordflow">default</span>:</div>
<div class=3D"line"><a name=3D"l00912"></a><span class=3D"lineno"> </span>k=
ind[0] =3D nrrdKindVector;</div>
<div class=3D"line"><a name=3D"l00913"></a><span class=3D"lineno"></span><s=
pan class=3D"keywordflow">break</span>;</div><br><br><div class=3D"gmail_qu=
ote">On Thu, Oct 11, 2012 at 2:09 PM, Ariel Hern=E1n Curiale <span dir=3D"l=
tr"><<a href=3D"mailto:curiale at gmail.com" target=3D"_blank">curiale at gmai=
l.com</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 style=3D"word-wrap:break-word"><div>I f=
ound in the header of the images that have the same type of kinds (kinds: v=
ector domain domain ). =A0I can read both images but I need to force the ty=
pe (Vector or Matrix).</div>
<div>According to the .nrrd definition the kinds of the image (Matrix) must=
not be a matrix ?</div><div><br><div><div>
<div style=3D"word-wrap:break-word"><span style=3D"text-indent:0px;letter-s=
pacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal=
;font-weight:normal;line-height:normal;border-collapse:separate;text-transf=
orm:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spa=
cing:0px"><div style=3D"word-wrap:break-word">
<span style=3D"text-indent:0px;letter-spacing:normal;font-variant:normal;te=
xt-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:norm=
al;border-collapse:separate;text-transform:none;font-size:medium;white-spac=
e:normal;font-family:Helvetica;word-spacing:0px"><div style=3D"word-wrap:br=
eak-word">
<span style=3D"border-collapse:separate;font-variant:normal;letter-spacing:=
normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-tran=
sform:none;white-space:normal;word-spacing:0px"><div style=3D"word-wrap:bre=
ak-word">
<span style=3D"border-collapse:separate;font-variant:normal;letter-spacing:=
normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-tran=
sform:none;white-space:normal;word-spacing:0px"><div style=3D"word-wrap:bre=
ak-word">
<span style=3D"border-collapse:separate;font-variant:normal;letter-spacing:=
normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-tran=
sform:none;white-space:normal;word-spacing:0px"><div style=3D"word-wrap:bre=
ak-word">
<span style=3D"border-collapse:separate;font-variant:normal;letter-spacing:=
normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-tran=
sform:none;white-space:normal;word-spacing:0px"><div style=3D"word-wrap:bre=
ak-word">
<span style=3D"border-collapse:separate;font-variant:normal;letter-spacing:=
normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-tran=
sform:none;white-space:normal;word-spacing:0px"><div style=3D"word-wrap:bre=
ak-word">
<span style=3D"border-collapse:separate;font-variant:normal;letter-spacing:=
normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-tran=
sform:none;white-space:normal;word-spacing:0px"><div style=3D"word-wrap:bre=
ak-word">
<span style=3D"border-collapse:separate;font-variant:normal;letter-spacing:=
normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-tran=
sform:none;white-space:normal;word-spacing:0px"><div style=3D"word-wrap:bre=
ak-word">
<div><div style=3D"font-style:normal;font-size:medium;font-family:Helvetica=
;font-weight:normal"><div style=3D"font-style:normal;font-size:medium;font-=
family:Helvetica;font-weight:normal">Saludos</div><div style=3D"font-style:=
normal;font-size:medium;font-family:Helvetica;font-weight:normal">
__________________________________<br><font color=3D"#b7bfc5">|</font>=A0Ar=
iel Hern=E1n Curiale Ph.D Student<br><font color=3D"#b7bfc5">|</font>=A0ETS=
I Telecomunicaci=F3n<br><font color=3D"#b7bfc5">|</font>=A0Universidad de V=
alladolid<br>
<font color=3D"#b7bfc5">|</font>=A0Campus Miguel Delibes<br><font color=3D"=
#b7bfc5">|</font>=A047011 Valladolid, Spain<br><font color=3D"#b7bfc5">|</f=
ont>=A0Phone: 983-423000 ext. 5590</div><div><font style=3D"font-family:Hel=
vetica;font-size:medium;font-weight:normal;font-style:normal" color=3D"#b7b=
7b7">|</font>=A0Web:=A0<a href=3D"http://www.curiale.com.ar/" target=3D"_bl=
ank"><font color=3D"#084ebe">www.curiale.com.ar</font></a><br>
<font style=3D"font-family:Helvetica;font-size:medium;font-weight:normal;fo=
nt-style:normal" color=3D"#b7b7b7">|</font><span style=3D"font-style:normal=
;font-size:medium;font-family:Helvetica;font-weight:normal">_______________=
__________________</span></div>
</div></div></div></span></div></span></div></span></div></span></div></spa=
n></div></span></div></span></div></span></div></span></div>
</div>
<br><div><div>El 11/10/2012, a las 18:19, Ariel Hern=E1n Curiale escribi=F3=
:</div><br><blockquote type=3D"cite"><div style=3D"word-wrap:break-word">An=
yone know what I'm doing wrong ?<div><div><span style=3D"border-collaps=
e:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font=
-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-=
auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0p=
x;font-size:medium"><span style=3D"border-collapse:separate;font-family:Hel=
vetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spac=
ing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-=
transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div s=
tyle=3D"word-wrap:break-word">
<span style=3D"border-collapse:separate;font-variant:normal;letter-spacing:=
normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-tran=
sform:none;white-space:normal;word-spacing:0px;font-style:normal;font-weigh=
t:normal;font-size:medium;font-family:Helvetica"><div style=3D"word-wrap:br=
eak-word">
<span style=3D"border-collapse:separate;font-family:Helvetica;font-style:no=
rmal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-heig=
ht:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white=
-space:normal;word-spacing:0px;font-size:medium"><div style=3D"word-wrap:br=
eak-word">
<span style=3D"border-collapse:separate;font-variant:normal;letter-spacing:=
normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-tran=
sform:none;white-space:normal;word-spacing:0px"><div style=3D"word-wrap:bre=
ak-word">
<span style=3D"border-collapse:separate;font-variant:normal;letter-spacing:=
normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-tran=
sform:none;white-space:normal;word-spacing:0px"><div style=3D"word-wrap:bre=
ak-word">
<span style=3D"border-collapse:separate;font-variant:normal;letter-spacing:=
normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-tran=
sform:none;white-space:normal;word-spacing:0px"><div style=3D"word-wrap:bre=
ak-word">
<span style=3D"border-collapse:separate;font-variant:normal;letter-spacing:=
normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-tran=
sform:none;white-space:normal;word-spacing:0px"><div style=3D"word-wrap:bre=
ak-word">
<span style=3D"border-collapse:separate;font-variant:normal;letter-spacing:=
normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-tran=
sform:none;white-space:normal;word-spacing:0px"><div style=3D"word-wrap:bre=
ak-word">
<span style=3D"border-collapse:separate;font-variant:normal;letter-spacing:=
normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-tran=
sform:none;white-space:normal;word-spacing:0px"><div style=3D"word-wrap:bre=
ak-word">
<span style=3D"border-collapse:separate;font-variant:normal;letter-spacing:=
normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-tran=
sform:none;white-space:normal;word-spacing:0px"><div style=3D"word-wrap:bre=
ak-word">
<div><div style=3D"font-style:normal;font-size:medium;font-family:Helvetica=
;font-weight:normal"><div style=3D"font-style:normal;font-size:medium;font-=
family:Helvetica;font-weight:normal"><br></div><div style=3D"font-style:nor=
mal;font-size:medium;font-family:Helvetica;font-weight:normal">
__________________________________<br><font color=3D"#b7bfc5">|</font>=A0Ar=
iel Hern=E1n Curiale Ph.D Student<br><font color=3D"#b7bfc5">|</font>=A0ETS=
I Telecomunicaci=F3n<br><font color=3D"#b7bfc5">|</font>=A0Universidad de V=
alladolid<br>
<font color=3D"#b7bfc5">|</font>=A0Campus Miguel Delibes<br><font color=3D"=
#b7bfc5">|</font>=A047011 Valladolid, Spain<br><font color=3D"#b7bfc5">|</f=
ont>=A0Phone: 983-423000 ext. 5590</div><div><font style=3D"font-family:Hel=
vetica;font-size:medium;font-weight:normal;font-style:normal" color=3D"#b7b=
7b7">|</font>=A0Web:=A0<a href=3D"http://www.curiale.com.ar/" target=3D"_bl=
ank"><font color=3D"#084ebe">www.curiale.com.ar</font></a><br>
<font style=3D"font-family:Helvetica;font-size:medium;font-weight:normal;fo=
nt-style:normal" color=3D"#b7b7b7">|</font><span style=3D"font-family:Helve=
tica;font-size:medium;font-weight:normal;font-style:normal">_______________=
__________________</span></div>
</div></div></div></span></div></span></div></span></div></span></div></spa=
n></div></span></div></span></div></span></div></span></div></span></span>
</div>
<br><div><div>El 11/10/2012, a las 18:05, Ariel Hern=E1n Curiale escribi=F3=
:</div><br><blockquote type=3D"cite"><div style=3D"word-wrap:break-word"><d=
iv>Hi,</div><div><br></div><div>I'm trying to detect =A0if the PixelTyp=
e of an image is a Vector or a Matrix with this code:</div>
<div><br></div><div><div style=3D"margin-top:0px;margin-right:0px;margin-bo=
ttom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><fon=
t face=3D"Helvetica" size=3D"3">itk::ImageIOBase::Pointer fieldIO;</font></=
div>
<div style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left=
:0px;font:normal normal normal 11px/normal Monaco"><font face=3D"Helvetica"=
size=3D"3">itk::ImageIOBase::IOPixelType pixelType;</font></div></div><div=
style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px=
;font:normal normal normal 11px/normal Monaco">
<div style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left=
:0px;font:normal normal normal 11px/normal Monaco"><font face=3D"Helvetica"=
size=3D"3">fieldIO =3D itk::ImageIOFactory::CreateImageIO(fieldPathFile.c_=
str(), itk::ImageIOFactory::ReadMode);</font></div>
<div style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left=
:0px;font:normal normal normal 11px/normal Monaco"><div style=3D"margin-top=
:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal =
normal 11px/normal Monaco">
<font face=3D"Helvetica" size=3D"3">fieldIO->SetFileName("field.nrr=
d");</font></div><div style=3D"margin-top:0px;margin-right:0px;margin-=
bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><f=
ont face=3D"Helvetica" size=3D"3">fieldIO->ReadImageInformation();</font=
></div>
<div style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left=
:0px;font:normal normal normal 11px/normal Monaco"><div style=3D"margin-top=
:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal =
normal 11px/normal Monaco">
<font face=3D"Helvetica" size=3D"3">pixelType =3D fieldIO->GetPixelType(=
);</font></div><div style=3D"margin-top:0px;margin-right:0px;margin-bottom:=
0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><font fac=
e=3D"Helvetica" size=3D"3"><br>
</font></div></div></div></div><div><div style=3D"margin-top:0px;margin-rig=
ht:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/nor=
mal Monaco"><font face=3D"Helvetica" size=3D"3">switch(pixelType)</font></d=
iv>
<div style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left=
:0px;font:normal normal normal 11px/normal Monaco"><font face=3D"Helvetica"=
size=3D"3"><span style=3D"white-space:pre-wrap"> </span>{</font></div><div=
style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px=
;font:normal normal normal 11px/normal Monaco">
<font face=3D"Helvetica" size=3D"3">=A0<span style=3D"white-space:pre-wrap"=
> </span>case itk::ImageIOBase::MATRIX:</font></div><div style=3D"margin-to=
p:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal=
normal 11px/normal Monaco">
<font face=3D"Helvetica" size=3D"3"><span style=3D"white-space:pre-wrap"> =
</span>std::cout<<"Matrix....."<<std::endl;</font></d=
iv><div style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-l=
eft:0px;font:normal normal normal 11px/normal Monaco">
<font face=3D"Helvetica" size=3D"3"><span style=3D"white-space:pre-wrap"> <=
/span>=A0 =A0 =A0 =A0=A0break;</font></div><div style=3D"margin-top:0px;mar=
gin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 1=
1px/normal Monaco">
<font face=3D"Helvetica" size=3D"3">=A0 =A0 =A0 =A0 case itk::ImageIOBase::=
VECTOR:</font></div></div><div style=3D"margin-top:0px;margin-right:0px;mar=
gin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco=
"><font face=3D"Helvetica" size=3D"3"><span style=3D"white-space:pre-wrap">=
</span>std::cout<<"Vector....."<<std::endl;</font><=
/div>
<div style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left=
:0px;font:normal normal normal 11px/normal Monaco"><font face=3D"Helvetica"=
size=3D"3">=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 break;</font></div><div style=
=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:=
normal normal normal 11px/normal Monaco">
<div style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left=
:0px;font:normal normal normal 11px/normal Monaco"><div style=3D"margin-top=
:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal =
normal 11px/normal Monaco">
<font face=3D"Helvetica" size=3D"3"><span style=3D"white-space:pre-wrap"> <=
/span>default:</font></div><div style=3D"margin-top:0px;margin-right:0px;ma=
rgin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monac=
o"><font face=3D"Helvetica" size=3D"3">=A0 =A0 =A0 <span style=3D"white-spa=
ce:pre-wrap"> </span>std::cerr << "PixelType unsupported."=
<< std::endl;</font></div>
<div style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left=
:0px;font:normal normal normal 11px/normal Monaco"><font face=3D"Helvetica"=
size=3D"3">=A0 =A0 =A0 <span style=3D"white-space:pre-wrap"> </span>retur=
n EXIT_FAILURE;</font></div>
<div style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left=
:0px;font:normal normal normal 11px/normal Monaco"><font face=3D"Helvetica"=
size=3D"3">=A0 =A0 }</font></div></div></div><div><br></div><div><br></div=
><div>
<br></div><div>The field.nrrd was write =A0using this code:</div><div><br><=
/div><div>1) Vector:</div><div><div style=3D"margin-top:0px;margin-right:0p=
x;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal M=
onaco">
<font face=3D"Helvetica" size=3D"3">typedef itk::Image< itk::Vector<f=
loat,3>,3> DeformationFieldType;</font></div></div><div><div style=3D=
"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:nor=
mal normal normal 11px/normal Monaco">
<font face=3D"Helvetica" size=3D"3">typedef itk::ImageFileWriter<Deforma=
tionFieldType> FieldWriterType;</font></div><div style=3D"margin-top:0px=
;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal norm=
al 11px/normal Monaco">
<font face=3D"Helvetica" size=3D"3">=A0 =A0 =A0 typename FieldWriterType::P=
ointer fieldWriter =3D FieldWriterType::New();</font></div><div style=3D"ma=
rgin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal=
normal normal 11px/normal Monaco">
<font face=3D"Helvetica" size=3D"3">=A0 =A0 =A0 fieldWriter->SetInput(de=
formationField);</font></div><div style=3D"margin-top:0px;margin-right:0px;=
margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Mon=
aco"><font face=3D"Helvetica" size=3D"3">=A0 =A0 =A0 fieldWriter->SetFil=
eName("fieldVector.nrrd");</font></div>
<div style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left=
:0px;font:normal normal normal 11px/normal Monaco"><font face=3D"Helvetica"=
size=3D"3">=A0 =A0 =A0 fieldWriter->Update();</font></div></div><div st=
yle=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;fo=
nt:normal normal normal 11px/normal Monaco">
<font face=3D"Helvetica" size=3D"3"><br></font></div><div>2) Matrix:</div><=
div><div style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-=
left:0px;font:normal normal normal 11px/normal Monaco"><font face=3D"Helvet=
ica" size=3D"3">typedef itk::Matrix< double, 2, 2 > <span style=3D"wh=
ite-space:pre-wrap"> </span>TensorPixelType;</font></div>
<div style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left=
:0px;font:normal normal normal 11px/normal Monaco"><font face=3D"Helvetica"=
size=3D"3">=A0 typedef itk::Image<TensorPixelType, 2><span style=3D"=
white-space:pre-wrap"> </span>StrainImageType;</font></div>
</div><div><div style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;=
margin-left:0px;font:normal normal normal 11px/normal Monaco"><font face=3D=
"Helvetica" size=3D"3">typedef itk::ImageFileWriter<typename StrainFilte=
rType::OutputImageType> FieldWriterType;</font></div>
<div style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left=
:0px;font:normal normal normal 11px/normal Monaco"><font face=3D"Helvetica"=
size=3D"3">=A0 =A0 =A0 typename FieldWriterType::Pointer fieldWriter =3D F=
ieldWriterType::New();</font></div>
<div style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left=
:0px;font:normal normal normal 11px/normal Monaco"><font face=3D"Helvetica"=
size=3D"3">=A0 =A0 =A0 fieldWriter->SetInput(strainFilter->GetStrain=
Tensor());</font></div>
<div style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left=
:0px;font:normal normal normal 11px/normal Monaco"><font face=3D"Helvetica"=
size=3D"3">=A0 =A0 =A0 fieldWriter->SetFileName("fieldMatrx.nrrd&q=
uot;);</font></div>
<div style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left=
:0px;font:normal normal normal 11px/normal Monaco"><font face=3D"Helvetica"=
size=3D"3">=A0 =A0 =A0 fieldWriter->Update();</font></div></div><div><b=
r></div>
<div><br></div><div>But in both case the=A0pixelType is=A0itk::ImageIOBase:=
:VECTOR.</div><div><br></div><div>What I'm doing wrong ?</div><br><div>
<div style=3D"word-wrap:break-word"><div style=3D"word-wrap:break-word"><di=
v style=3D"word-wrap:break-word"><div style=3D"word-wrap:break-word"><div s=
tyle=3D"word-wrap:break-word"><div style=3D"word-wrap:break-word"><div styl=
e=3D"word-wrap:break-word">
<div style=3D"word-wrap:break-word"><div style=3D"word-wrap:break-word"><di=
v style=3D"word-wrap:break-word"><div><div style=3D"font-style:normal;font-=
size:medium;font-family:Helvetica;font-weight:normal"><div style=3D"font-st=
yle:normal;font-size:medium;font-family:Helvetica;font-weight:normal">
Thanks</div><div style=3D"font-style:normal;font-size:medium;font-family:He=
lvetica;font-weight:normal">__________________________________<br><font col=
or=3D"#b7bfc5">|</font>=A0Ariel Hern=E1n Curiale Ph.D Student<br><font colo=
r=3D"#b7bfc5">|</font>=A0ETSI Telecomunicaci=F3n<br>
<font color=3D"#b7bfc5">|</font>=A0Universidad de Valladolid<br><font color=
=3D"#b7bfc5">|</font>=A0Campus Miguel Delibes<br><font color=3D"#b7bfc5">|<=
/font>=A047011 Valladolid, Spain<br><font color=3D"#b7bfc5">|</font>=A0Phon=
e: 983-423000 ext. 5590</div>
<div><font style=3D"font-family:Helvetica;font-size:medium;font-weight:norm=
al;font-style:normal" color=3D"#b7b7b7">|</font>=A0Web:=A0<a href=3D"http:/=
/www.curiale.com.ar/" target=3D"_blank"><font color=3D"#084ebe">www.curiale=
.com.ar</font></a><br>
<font style=3D"font-family:Helvetica;font-size:medium;font-weight:normal;fo=
nt-style:normal" color=3D"#b7b7b7">|</font>________________________________=
_</div></div></div></div></div></div></div></div></div></div></div></div></=
div>
</div>
<br></div></blockquote></div><br></div></div></blockquote></div><br></div><=
/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.php" target=3D"_blan=
k">http://www.kitware.com/products/protraining.php</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><br clear=3D"all"><br>-- <br>robert<br><br>
--20cf30207fc402155504cbce38ac--
More information about the Insight-users
mailing list