<div dir="ltr">why you didn't insert these?<br><br>vectorImage->SetVectorLength(vectorLength);<br>vectorImage->SetSpacing(vec_spacing);<br><br>It shouldn't be?:<br><br>typedef itk::Image<unsigned short, 3> 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->SetSpacing(vec_spacing);</b><br>image->SetRegions(region);<br><b>image->SetVectorLength(vectorLength);</b><br>
image->Allocate();<br>
}<br><br><div class="gmail_quote">On Fri, May 18, 2012 at 6:09 PM, David Doria <span dir="ltr"><<a href="mailto:daviddoria@gmail.com" target="_blank">daviddoria@gmail.com</a>></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 <<a href="mailto:hilahiler@gmail.com">hilahiler@gmail.com</a>> wrote:<br>
> Hi David, thank you for your suggestion.<br>
><br>
> actually I don't know how to generate a dummy image that has the following<br>
> properties:<br>
><br>
> Input image:<br>
> PixelType: unsigned short<br>
><br>
> Dimension: 3<br>
><br>
> Dimensions: 202 419 157<br>
><br>
> IndexToWorldTransform:<br>
><br>
> Matrix:<br>
><br>
> 0.488281 0 0<br>
><br>
> -0 -0.488281 0<br>
><br>
> -0 0 1<br>
><br>
><br>
><br>
> and in addition to my code below:<br>
><br>
><br>
> #define myDimension 3<br>
> #define vectorLength 3<br>
<br>
</div>typedef itk::Image<unsigned short, 3> 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->SetRegions(region);<br>
image->Allocate();<br>
}<br>
<br>
I don't think the 'matrix' would have anything to do with this problem?<br>
<span class="HOEnZb"><font color="#888888"><br>
David<br>
</font></span></blockquote></div><br></div>