[ITK] [ITK-users] How to write the codes in python?
沈庄明
zhuangming.shen at sphic.org.cn
Tue Nov 3 19:17:48 EST 2015
Hi all,
I'd like to know how to convert Image1.cxx (see codes below) to python, especially "ImageType::RegionType region;". Could anyone give me some hints? Thanks in advance.
typedef itk::Image<unsigned short, 3> ImageType;
ImageType::Pointer image = ImageType::New();
ImageType::IndexType start;
start[0] = 0;
start[1] = 0;
start[2] = 0;
ImageType::SizeType size;
size[0] = 200;
size[1] = 200;
size[2] = 200;
ImageType::RegionType region;
region.SetSize(size);
region.SetIndex(start);
image->SetRegions(region);
image->Allocate();
Regards,
Zhuangming Shen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20151104/00df2b78/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