[Insight-users] generating a vector Image
Hila Hiler
hilahiler at gmail.com
Fri May 18 11:19:43 EDT 2012
why you didn't insert these?
vectorImage->SetVectorLength(vectorLength);
vectorImage->SetSpacing(vec_spacing);
It shouldn't be?:
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;
*image->SetSpacing(vec_spacing);*
image->SetRegions(region);
*image->SetVectorLength(vectorLength);*
image->Allocate();
}
On Fri, May 18, 2012 at 6:09 PM, David Doria <daviddoria at gmail.com> wrote:
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120518/12be194b/attachment.htm>
More information about the Insight-users
mailing list