<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Dear Yong,<br>
<br>
your binary image data can be inserted into GATE macro using the
interfile format, as you mentioned.<br>
For this purpose you need a header file that will describe the
properties of your image. This header file is basically a text file
organizing all necessary information according to the Interfile format.<br>
<br>
If you are using Gate version 4.0.0, you can find an example interfile
header file at the the
"examples/example_PHAMTOM_SOURCE/Voxelized_Phantom_Source" directory of
your GATE installation directory.<br>
It is named as "hof3.h33" implying that it is an Interfile33 header
file. You can open this file as a text file and view the attributes of
it's variables.For your convenience, I have attached it in this e-mail.<br>
<br>
This header points to the binary image data "hof3.i33" as specified by
the attribute of it's variable: "!name of data file". Now, you can
locate in your system this binary image file at the same directory as
above.<br>
<br>
Another important variable is the one under the name: "total number of
images". The content of this variable indicates the number of slices of
a 3D image. In the example given we are referring to a 3D image of 55
slices. As you can observe, the same value will be given to each of the
following variables: <br>
number of images/energy window <br>
number of projections<br>
number of slices<br>
<br>
The dimensions of each slice is specified at the following variables:
matrix size [1] and matrix size [2]<br>
For example the following definition <br>
matrix size [1] := 128<br>
matrix size [2] := 128<br>
<br>
indicates that each slice is of 128x128 voxels.<br>
<br>
Moreover, the size (in mm) of each voxel is defined as follows:<br>
scaling factor (mm/pixel) [1] := +2.000000e+00 (length in mm along one
of the two directions of the plane of the slice)<br>
scaling factor (mm/pixel) [2] := +2.000000e+00 (length in mm along the
other direction of the plane of the slice)<br>
slice thickness (pixels) := +2.000000e+00 (length in mm of the slice
thickness) --> I believe this value indicates length in mm and NOT
in number of pixels.<br>
<br>
So, the previous definition implies a voxel dimension of [x,y,z] =
[2mm,2mm,2mm]<br>
Given that the size of the image in voxels is [x,y,z] = [128,128,55],
the total dimensions of the image in GATE world would be:<br>
[x,y,z] = [256mm, 256mm, 110mm]<br>
<br>
The orientation of the slice plane is set by the following attribute:<br>
slice orientation := Transverse<br>
<br>
GATE interfile reader assumes that the binary image file is of unsigned
integer data format (2 bytes per voxel or 16bits). Therefore the user
will need to provide a binary file of this data format.<br>
For this reason, the interfile header file will also specify the
following<br>
number format := unsigned integer<br>
number of bytes per pixel := 2<br>
<br>
In the "examples/example_PHAMTOM_SOURCE/Voxelized_Phantom_Source"
directory you will also find all the other files you will need to
insert a voxelized phantom and/or voxelized source into a GATE macro.<br>
<br>
If you need to insert a voxelized source, you should confirm that the
source is placed at the right position within GATE world. Normally that
requires the translation of the source distribution along -X, -Y and -Z
direction by half the size of the source along those axes respectively,
i.e. by a [-128mm, -128mm, -55mm] translation vector.<br>
<br>
<br>
<br>
Best regards<br>
Nicolas<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
Yong wu wrote:
<blockquote
cite="mid:7ce32aa00903191241u65c2f966hc0c1c310b8833f0a@mail.gmail.com"
type="cite">Dear All,
<div><br>
</div>
<div>Sorry to trouble you all. </div>
<div><br>
</div>
<div>I have some image data in binary format(.bin), but how can I
put it into a macro file?</div>
<div>According the Hoffman-Brain example, I should convert the binary
data to interfile format. </div>
<div>As far as I know, I have to add a header file, how can I do
this? Or in the manual, I could </div>
<div>use ASCII input, how can I use the binary file as ASCII ?</div>
<div><br>
</div>
<div>Many thanks,</div>
<div>Yong</div>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Gate-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Gate-users@lists.healthgrid.org">Gate-users@lists.healthgrid.org</a>
<a class="moz-txt-link-freetext" href="http://lists.healthgrid.org/mailman/listinfo/gate-users">http://lists.healthgrid.org/mailman/listinfo/gate-users</a>
</pre>
</blockquote>
<br>
</body>
</html>