<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Thanks Robert for you reply and you are right this type is not defined in the write function (itk 4.2.0 and 4.2.1). How I suspected the problems is in the write function.<div><br></div><div><br></div><div><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-style: normal; font-weight: normal; font-size: medium; font-family: Helvetica; color: rgb(0, 0, 0); "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-weight: normal; font-style: normal; "><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-weight: normal; font-style: normal; ">Thanks again.</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-weight: normal; font-style: normal; ">__________________________________<br><font class="Apple-style-span" color="#b7bfc5">|</font>&nbsp;Ariel Hernán Curiale Ph.D Student<br><font class="Apple-style-span" color="#b7bfc5">|</font>&nbsp;ETSI Telecomunicación<br><font class="Apple-style-span" color="#b7bfc5">|</font>&nbsp;Universidad de Valladolid<br><font class="Apple-style-span" color="#b7bfc5">|</font>&nbsp;Campus Miguel Delibes<br><font class="Apple-style-span" color="#b7bfc5">|</font>&nbsp;47011 Valladolid, Spain<br><font class="Apple-style-span" color="#b7bfc5">|</font>&nbsp;Phone: 983-423000 ext. 5590</div><div><font class="Apple-style-span" color="#b7b7b7" style="font-family: Helvetica; font-size: medium; font-weight: normal; font-style: normal; ">|</font>&nbsp;Web:&nbsp;<a href="http://www.curiale.com.ar/"><font class="Apple-style-span" color="#084ebe">www.curiale.com.ar</font></a><br><font class="Apple-style-span" color="#b7b7b7" style="font-family: Helvetica; font-size: medium; font-weight: normal; font-style: normal; ">|</font><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; font-weight: normal; font-style: normal; color: rgb(0, 0, 0); ">_________________________________</span></div></div></div></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></span>
</div>
<br><div><div>El 11/10/2012, a las 22:14, robert tamburo escribió:</div><br class="Apple-interchange-newline"><blockquote type="cite">According to the Wiki (<a href="http://www.itk.org/Wiki/ITK/File_Formats">http://www.itk.org/Wiki/ITK/File_Formats</a>) the NRRD imageIO should support itk::ImageIOBase::MATRIX. <br><br>From the source of NrrdImageIO, it appears that itk::ImageIOBase::MATRIX is not defined and defaults to VECTOR.<br>
<br><br>Read function:<br><span class="lineno"></span><span class="keywordflow">case</span> nrrdKindHSVColor:
<div class="line"><a name="l00392"></a><span class="lineno"></span><span class="keywordflow">case</span> nrrdKindXYZColor:</div>
<div class="line"><a name="l00393"></a><span class="lineno"></span><span class="keywordflow">case</span> nrrdKindQuaternion:</div>
<div class="line"><a name="l00394"></a><span class="lineno"></span><span class="keywordflow">case</span> nrrdKind2DSymMatrix:</div>
<div class="line"><a name="l00395"></a><span class="lineno"></span><span class="keywordflow">case</span> nrrdKind2DMaskedSymMatrix:</div>
<div class="line"><a name="l00396"></a><span class="lineno"></span><span class="keywordflow">case</span> nrrdKind2DMatrix:</div>
<div class="line"><span class="keywordflow">case</span> nrrdKind2DMaskedMatrix:</div>
<div class="line"><a name="l00398"></a><span class="lineno"></span><span class="keywordflow">case</span> nrrdKind3DMatrix:</div>
<div class="line"><span class="comment">// for all other Nrrd kinds, we punt and call it a vector</span></div>
<div class="line"><a name="l00400"></a><span class="lineno"> t</span>his-&gt;<a class="code" href="http://www.orfeo-toolbox.org/doxygen/classitk_1_1ImageIOBase.html#a885bce93c88376980aa19ad8f23ba683">SetPixelType</a>( <a class="code" href="http://www.orfeo-toolbox.org/doxygen/classitk_1_1ImageIOBase.html#abd189f096c2a1b3ea559bc3e4849f658ab3ad7f87424e8849d2f11012f6e16793">ImageIOBase::VECTOR</a> );</div>

<div class="line"><a name="l00401"></a><span class="lineno"> </span>this-&gt;<a class="code" href="http://www.orfeo-toolbox.org/doxygen/classitk_1_1ImageIOBase.html#a2ee77061a748bee3b772c4346a486fbb">SetNumberOfComponents</a>(size);</div>

<div class="line"><span class="lineno"></span><span class="keywordflow">break</span>;</div><br>Write function (no case for MATRIX):<br><span class="lineno"></span><span class="keywordflow">case</span> <a class="code" href="http://www.orfeo-toolbox.org/doxygen/classitk_1_1ImageIOBase.html#abd189f096c2a1b3ea559bc3e4849f658ab3ad7f87424e8849d2f11012f6e16793">ImageIOBase::VECTOR</a>:
<div class="line"><a name="l00909"></a><span class="lineno"></span><span class="keywordflow">case</span> <a class="code" href="http://www.orfeo-toolbox.org/doxygen/classitk_1_1ImageIOBase.html#abd189f096c2a1b3ea559bc3e4849f658a71cce79d8dbb0db0202045bf46f2707a">ImageIOBase::OFFSET</a>:      <span class="comment">// HEY is this right?</span></div>

<div class="line"><a name="l00910"></a><span class="lineno"></span><span class="keywordflow">case</span> <a class="code" href="http://www.orfeo-toolbox.org/doxygen/classitk_1_1ImageIOBase.html#abd189f096c2a1b3ea559bc3e4849f658abb242ae73052e7f58ddcca20478e69a9">ImageIOBase::FIXEDARRAY</a>:  <span class="comment">// HEY is this right?</span></div>

<div class="line"><a name="l00911"></a><span class="lineno"></span><span class="keywordflow">default</span>:</div>
<div class="line"><a name="l00912"></a><span class="lineno"> </span>kind[0] = nrrdKindVector;</div>
<div class="line"><a name="l00913"></a><span class="lineno"></span><span class="keywordflow">break</span>;</div><br><br><div class="gmail_quote">On Thu, Oct 11, 2012 at 2:09 PM, Ariel Hernán Curiale <span dir="ltr">&lt;<a href="mailto:curiale@gmail.com" target="_blank">curiale@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>I found in the header of the images that have the same type of kinds (kinds: vector domain domain ). &nbsp;I can read both images but I need to force the type (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="word-wrap:break-word"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word">
<div><div style="font-style:normal;font-size:medium;font-family:Helvetica;font-weight:normal"><div style="font-style:normal;font-size:medium;font-family:Helvetica;font-weight:normal">Saludos</div><div style="font-style:normal;font-size:medium;font-family:Helvetica;font-weight:normal">
__________________________________<br><font color="#b7bfc5">|</font>&nbsp;Ariel Hernán Curiale Ph.D Student<br><font color="#b7bfc5">|</font>&nbsp;ETSI Telecomunicación<br><font color="#b7bfc5">|</font>&nbsp;Universidad de Valladolid<br>
<font color="#b7bfc5">|</font>&nbsp;Campus Miguel Delibes<br><font color="#b7bfc5">|</font>&nbsp;47011 Valladolid, Spain<br><font color="#b7bfc5">|</font>&nbsp;Phone: 983-423000 ext. 5590</div><div><font style="font-family:Helvetica;font-size:medium;font-weight:normal;font-style:normal" color="#b7b7b7">|</font>&nbsp;Web:&nbsp;<a href="http://www.curiale.com.ar/" target="_blank"><font color="#084ebe">www.curiale.com.ar</font></a><br>
<font style="font-family:Helvetica;font-size:medium;font-weight:normal;font-style:normal" color="#b7b7b7">|</font><span style="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></span></div></span></div></span></div></span></div></span></div>
</div>
<br><div><div>El 11/10/2012, a las 18:19, Ariel Hernán Curiale escribió:</div><br><blockquote type="cite"><div style="word-wrap:break-word">Anyone know what I'm doing wrong ?<div><div><span style="border-collapse: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:0px;font-size:medium"><span style="border-collapse: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:0px;font-size:medium"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-style:normal;font-weight:normal;font-size:medium;font-family:Helvetica"><div style="word-wrap:break-word">
<span style="border-collapse: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:0px;font-size:medium"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word">
<div><div style="font-style:normal;font-size:medium;font-family:Helvetica;font-weight:normal"><div style="font-style:normal;font-size:medium;font-family:Helvetica;font-weight:normal"><br></div><div style="font-style:normal;font-size:medium;font-family:Helvetica;font-weight:normal">
__________________________________<br><font color="#b7bfc5">|</font>&nbsp;Ariel Hernán Curiale Ph.D Student<br><font color="#b7bfc5">|</font>&nbsp;ETSI Telecomunicación<br><font color="#b7bfc5">|</font>&nbsp;Universidad de Valladolid<br>
<font color="#b7bfc5">|</font>&nbsp;Campus Miguel Delibes<br><font color="#b7bfc5">|</font>&nbsp;47011 Valladolid, Spain<br><font color="#b7bfc5">|</font>&nbsp;Phone: 983-423000 ext. 5590</div><div><font style="font-family:Helvetica;font-size:medium;font-weight:normal;font-style:normal" color="#b7b7b7">|</font>&nbsp;Web:&nbsp;<a href="http://www.curiale.com.ar/" target="_blank"><font color="#084ebe">www.curiale.com.ar</font></a><br>
<font style="font-family:Helvetica;font-size:medium;font-weight:normal;font-style:normal" color="#b7b7b7">|</font><span style="font-family:Helvetica;font-size:medium;font-weight:normal;font-style:normal">_________________________________</span></div>
</div></div></div></span></div></span></div></span></div></span></div></span></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án Curiale escribió:</div><br><blockquote type="cite"><div style="word-wrap:break-word"><div>Hi,</div><div><br></div><div>I'm trying to detect &nbsp;if the PixelType of an image is a Vector or a Matrix with this code:</div>
<div><br></div><div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><font face="Helvetica" size="3">itk::ImageIOBase::Pointer fieldIO;</font></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><font face="Helvetica" size="3">itk::ImageIOBase::IOPixelType pixelType;</font></div></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><font face="Helvetica" size="3">fieldIO = itk::ImageIOFactory::CreateImageIO(fieldPathFile.c_str(), itk::ImageIOFactory::ReadMode);</font></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<font face="Helvetica" size="3">fieldIO-&gt;SetFileName("field.nrrd");</font></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><font face="Helvetica" size="3">fieldIO-&gt;ReadImageInformation();</font></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<font face="Helvetica" size="3">pixelType = fieldIO-&gt;GetPixelType();</font></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><font face="Helvetica" size="3"><br>
</font></div></div></div></div><div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><font face="Helvetica" size="3">switch(pixelType)</font></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><font face="Helvetica" size="3"><span style="white-space:pre-wrap">        </span>{</font></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<font face="Helvetica" size="3">&nbsp;<span style="white-space:pre-wrap">        </span>case itk::ImageIOBase::MATRIX:</font></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<font face="Helvetica" size="3"><span style="white-space:pre-wrap">                </span>std::cout&lt;&lt;"Matrix....."&lt;&lt;std::endl;</font></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<font face="Helvetica" size="3"><span style="white-space:pre-wrap">        </span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;break;</font></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<font face="Helvetica" size="3">&nbsp; &nbsp; &nbsp; &nbsp; case itk::ImageIOBase::VECTOR:</font></div></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><font face="Helvetica" size="3"><span style="white-space:pre-wrap">                </span>std::cout&lt;&lt;"Vector....."&lt;&lt;std::endl;</font></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><font face="Helvetica" size="3">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;</font></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<font face="Helvetica" size="3"><span style="white-space:pre-wrap">        </span>default:</font></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><font face="Helvetica" size="3">&nbsp; &nbsp; &nbsp; <span style="white-space:pre-wrap">                </span>std::cerr &lt;&lt; "PixelType unsupported." &lt;&lt; std::endl;</font></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><font face="Helvetica" size="3">&nbsp; &nbsp; &nbsp; <span style="white-space:pre-wrap">                </span>return EXIT_FAILURE;</font></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><font face="Helvetica" size="3">&nbsp; &nbsp; }</font></div></div></div><div><br></div><div><br></div><div>
<br></div><div>The field.nrrd was write &nbsp;using this code:</div><div><br></div><div>1) Vector:</div><div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<font face="Helvetica" size="3">typedef itk::Image&lt; itk::Vector&lt;float,3&gt;,3&gt; DeformationFieldType;</font></div></div><div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<font face="Helvetica" size="3">typedef itk::ImageFileWriter&lt;DeformationFieldType&gt; FieldWriterType;</font></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<font face="Helvetica" size="3">&nbsp; &nbsp; &nbsp; typename FieldWriterType::Pointer fieldWriter = FieldWriterType::New();</font></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<font face="Helvetica" size="3">&nbsp; &nbsp; &nbsp; fieldWriter-&gt;SetInput(deformationField);</font></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><font face="Helvetica" size="3">&nbsp; &nbsp; &nbsp; fieldWriter-&gt;SetFileName("fieldVector.nrrd");</font></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><font face="Helvetica" size="3">&nbsp; &nbsp; &nbsp; fieldWriter-&gt;Update();</font></div></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<font face="Helvetica" size="3"><br></font></div><div>2) Matrix:</div><div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><font face="Helvetica" size="3">typedef itk::Matrix&lt; double, 2, 2 &gt; <span style="white-space:pre-wrap">        </span>TensorPixelType;</font></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><font face="Helvetica" size="3">&nbsp; typedef itk::Image&lt;TensorPixelType, 2&gt;<span style="white-space:pre-wrap">        </span>StrainImageType;</font></div>
</div><div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><font face="Helvetica" size="3">typedef itk::ImageFileWriter&lt;typename StrainFilterType::OutputImageType&gt; FieldWriterType;</font></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><font face="Helvetica" size="3">&nbsp; &nbsp; &nbsp; typename FieldWriterType::Pointer fieldWriter = FieldWriterType::New();</font></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><font face="Helvetica" size="3">&nbsp; &nbsp; &nbsp; fieldWriter-&gt;SetInput(strainFilter-&gt;GetStrainTensor());</font></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><font face="Helvetica" size="3">&nbsp; &nbsp; &nbsp; fieldWriter-&gt;SetFileName("fieldMatrx.nrrd");</font></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><font face="Helvetica" size="3">&nbsp; &nbsp; &nbsp; fieldWriter-&gt;Update();</font></div></div><div><br></div>
<div><br></div><div>But in both case the&nbsp;pixelType is&nbsp;itk::ImageIOBase::VECTOR.</div><div><br></div><div>What I'm doing wrong ?</div><br><div>
<div style="word-wrap:break-word"><div style="word-wrap:break-word"><div style="word-wrap:break-word"><div style="word-wrap:break-word"><div style="word-wrap:break-word"><div style="word-wrap:break-word"><div style="word-wrap:break-word">
<div style="word-wrap:break-word"><div style="word-wrap:break-word"><div style="word-wrap:break-word"><div><div style="font-style:normal;font-size:medium;font-family:Helvetica;font-weight:normal"><div style="font-style:normal;font-size:medium;font-family:Helvetica;font-weight:normal">
Thanks</div><div style="font-style:normal;font-size:medium;font-family:Helvetica;font-weight:normal">__________________________________<br><font color="#b7bfc5">|</font>&nbsp;Ariel Hernán Curiale Ph.D Student<br><font color="#b7bfc5">|</font>&nbsp;ETSI Telecomunicación<br>
<font color="#b7bfc5">|</font>&nbsp;Universidad de Valladolid<br><font color="#b7bfc5">|</font>&nbsp;Campus Miguel Delibes<br><font color="#b7bfc5">|</font>&nbsp;47011 Valladolid, Spain<br><font color="#b7bfc5">|</font>&nbsp;Phone: 983-423000 ext. 5590</div>
<div><font style="font-family:Helvetica;font-size:medium;font-weight:normal;font-style:normal" color="#b7b7b7">|</font>&nbsp;Web:&nbsp;<a href="http://www.curiale.com.ar/" target="_blank"><font color="#084ebe">www.curiale.com.ar</font></a><br>
<font style="font-family:Helvetica;font-size:medium;font-weight:normal;font-style:normal" color="#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="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.php" target="_blank">http://www.kitware.com/products/protraining.php</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>robert<br><br>
</blockquote></div><br></div></body></html>