[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/insight-users/attachments/20151104/00df2b78/attachment.html>


More information about the Insight-users mailing list