[Insight-users] Image format

Einstein, Daniel R daniel.einstein at pnl.gov
Wed Jul 6 13:55:11 EDT 2005


Hello friends,

I am just getting started with ITK so here is my stupid question. I
intend to interface with the ITK filters via Python. We have a
segmentation and visualization code (http://www.compgeomco.com/), that
permits Python scripting. All of the wrapping has been already done (and
it works!). However, I need to figure out how to interface the two. Our
code reads in images and creates (usually) a 3D array that contains
(usually) 8-bit unsigned data. The data structure of this array is:

for ( z = 0; z < zmax; z++ ) { 
  for ( y = 0; y < ymax; y++ ) { 
    for ( x = 0; x < xmax; x++ ) { 
    (ASCII_write(data(x,y,z)); 
    } 
  } 
} 

What is the data structure that ITK expects? Do I have to reshape my
array before messing with it? 

Dan

Daniel R Einstein, PhD
Biological Monitoring and Modeling
Pacific Northwest National Laboratory
P.O. Box 999; MSIN P7-59
Richland, WA 99352
Tel: 509/ 376-2924
Fax: 509/376-9064
daniel.einstein at pnl.gov


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20050706/7e49eace/attachment.html


More information about the Insight-users mailing list