<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7232.77">
<TITLE>Image format</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hello friends,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">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 (</FONT><A HREF="http://www.compgeomco.com/"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://www.compgeomco.com/</FONT></U></A><FONT SIZE=2 FACE="Arial">), 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:</FONT></P>

<P><FONT COLOR="#000000" FACE="KAHCML+TimesNewRoman">for ( z = 0; z &lt; zmax; z++ ) { </FONT>

<BR><FONT COLOR="#000000" FACE="KAHCML+TimesNewRoman">&nbsp; for ( y = 0; y &lt; ymax; y++ ) { </FONT>

<BR><FONT COLOR="#000000" FACE="KAHCML+TimesNewRoman">&nbsp;&nbsp;&nbsp; for ( x = 0; x &lt; xmax; x++ ) { </FONT>

<BR><FONT COLOR="#000000" FACE="KAHCML+TimesNewRoman">&nbsp;&nbsp;&nbsp; (ASCII_write(data(x,y,z)); </FONT>

<BR><FONT COLOR="#000000" FACE="KAHCML+TimesNewRoman">&nbsp;&nbsp;&nbsp; } </FONT>

<BR><FONT COLOR="#000000" FACE="KAHCML+TimesNewRoman">&nbsp; } </FONT>

<BR><FONT COLOR="#000000" FACE="KAHCML+TimesNewRoman">} </FONT>
</P>

<P><FONT COLOR="#000000" FACE="KAHCML+TimesNewRoman">What is the data structure that ITK expects? Do I have to reshape my array before messing with it? </FONT>
</P>

<P><FONT COLOR="#000000" FACE="KAHCML+TimesNewRoman">Dan</FONT>
</P>

<P><FONT FACE="Times New Roman">Daniel R Einstein, PhD<BR>
Biological Monitoring and Modeling<BR>
Pacific Northwest National Laboratory<BR>
P.O. Box 999; MSIN P7-59<BR>
Richland, WA 99352<BR>
Tel: 509/ 376-2924<BR>
Fax: 509/376-9064<BR>
</FONT><A HREF="mailto:daniel.einstein@pnl.gov"><U><FONT COLOR="#0000FF" FACE="Times New Roman">daniel.einstein@pnl.gov</FONT></U></A>
</P>
<BR>

</BODY>
</HTML>