[Insight-users] generating a vector Image

David Doria daviddoria at gmail.com
Fri May 18 11:09:18 EDT 2012


On Fri, May 18, 2012 at 11:03 AM, Hila Hiler <hilahiler at gmail.com> wrote:
> Hi David, thank you for your suggestion.
>
> actually I don't know how to generate a dummy image that has the following
> properties:
>
> Input image:
> PixelType: unsigned short
>
> Dimension: 3
>
> Dimensions: 202 419 157
>
> IndexToWorldTransform:
>
> Matrix:
>
> 0.488281 0 0
>
> -0 -0.488281 0
>
> -0 0 1
>
>
>
> and in addition to my code below:
>
>
> #define myDimension 3
> #define vectorLength 3

typedef itk::Image<unsigned short, 3>  ImageType;

void CreateImage(ImageType* const image)
{
  ImageType::IndexType start;
  start.Fill(0);

  ImageType::SizeType size;
  size[0] =202; size[1] =419; size[2] = 157;

  ImageType::RegionType region(start,size);
  image->SetRegions(region);
  image->Allocate();
}

I don't think the 'matrix' would have anything to do with this problem?

David


More information about the Insight-users mailing list