[ITK] [ITK-users] SimpleITK not saving Origin when creating new images?

Matias Montroull matimontg at gmail.com
Tue Mar 7 20:34:58 EST 2017


Hi,

I have this simple code that creates blank images and I set the origin to
256 256, however, the resulting image doesn't seem to have the Origin set
to what I specify, or at least I don't see it in the image tags..

for (int i = 0; i < 160; i++)
            {
                itk.simple.Image image = new itk.simple.Image(512, 512,
itk.simple.PixelIDValueEnum.sitkInt16);
                image.SetOrigin(new VectorDouble(new Double[] {256,256,0}));

                itk.simple.ImageFileWriter writer_usuario = new
ImageFileWriter();
                writer_usuario.SetFileName("C:/temp/" + i + ".dcm");
                writer_usuario.Execute(image);
            }

any clue?

Thanks,
…
-- 
Matias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20170308/6c0e2367/attachment.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list