<div dir="ltr">why you didn&#39;t insert these?<br><br>vectorImage-&gt;SetVectorLength(vectorLength);<br>vectorImage-&gt;SetSpacing(vec_spacing);<br><br>It shouldn&#39;t be?:<br><br>typedef itk::Image&lt;unsigned short, 3&gt;  ImageType;<br>

<br>
void CreateImage(ImageType* const image)<br>
{<br>
  ImageType::IndexType start;<br>
  start.Fill(0);<br>
<br>
  ImageType::SizeType size;<br>
  size[0] =202; size[1] =419; size[2] = 157;<br>
<br>
 <b>image-&gt;SetSpacing(vec_spacing);</b><br>image-&gt;SetRegions(region);<br><b>image-&gt;SetVectorLength(vectorLength);</b><br>
 image-&gt;Allocate();<br>
}<br><br><div class="gmail_quote">On Fri, May 18, 2012 at 6:09 PM, David Doria <span dir="ltr">&lt;<a href="mailto:daviddoria@gmail.com" target="_blank">daviddoria@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 class="im">On Fri, May 18, 2012 at 11:03 AM, Hila Hiler &lt;<a href="mailto:hilahiler@gmail.com">hilahiler@gmail.com</a>&gt; wrote:<br>
&gt; Hi David, thank you for your suggestion.<br>
&gt;<br>
&gt; actually I don&#39;t know how to generate a dummy image that has the following<br>
&gt; properties:<br>
&gt;<br>
&gt; Input image:<br>
&gt; PixelType: unsigned short<br>
&gt;<br>
&gt; Dimension: 3<br>
&gt;<br>
&gt; Dimensions: 202 419 157<br>
&gt;<br>
&gt; IndexToWorldTransform:<br>
&gt;<br>
&gt; Matrix:<br>
&gt;<br>
&gt; 0.488281 0 0<br>
&gt;<br>
&gt; -0 -0.488281 0<br>
&gt;<br>
&gt; -0 0 1<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; and in addition to my code below:<br>
&gt;<br>
&gt;<br>
&gt; #define myDimension 3<br>
&gt; #define vectorLength 3<br>
<br>
</div>typedef itk::Image&lt;unsigned short, 3&gt;  ImageType;<br>
<br>
void CreateImage(ImageType* const image)<br>
{<br>
  ImageType::IndexType start;<br>
  start.Fill(0);<br>
<br>
  ImageType::SizeType size;<br>
  size[0] =202; size[1] =419; size[2] = 157;<br>
<br>
  ImageType::RegionType region(start,size);<br>
  image-&gt;SetRegions(region);<br>
  image-&gt;Allocate();<br>
}<br>
<br>
I don&#39;t think the &#39;matrix&#39; would have anything to do with this problem?<br>
<span class="HOEnZb"><font color="#888888"><br>
David<br>
</font></span></blockquote></div><br></div>