<html><head></head><body ocsi="0" fpstyle="1" data-blackberry-caret-color="#00a8df" style="background-color: rgb(255, 255, 255); line-height: initial;"><div style="font-size: initial; text-align: initial; width: 336px; font-family: Calibri, 'Slate Pro', sans-serif; color: rgb(31, 73, 125);">Hi David,</div><div style="font-size: initial; text-align: initial; width: 336px; font-family: Calibri, 'Slate Pro', sans-serif; color: rgb(31, 73, 125);"><br name="BB10" caretmarkerset="INVALID" class="markedForCaretMarkerRemoval"></div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"><span style="font-family: Calibri, 'Slate Pro', sans-serif; font-size: initial; text-align: initial; line-height: initial;">Reading voxelized ‎sources can be nasty. One part of your problem is related to your interfile data which is long float. You need unsigned integer for Gate to do well. I usually do the conversion with a small python script, which I could share if you liked.</span></div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"><span style="font-family: Calibri, 'Slate Pro', sans-serif; font-size: initial; text-align: initial; line-height: initial;"><br></span></div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"><span style="font-family: Calibri, 'Slate Pro', sans-serif; font-size: initial; text-align: initial; line-height: initial;">I hope this helps.</span></div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"><span style="font-family: Calibri, 'Slate Pro', sans-serif; font-size: initial; text-align: initial; line-height: initial;"><br></span></div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"><span style="font-family: Calibri, 'Slate Pro', sans-serif; font-size: initial; text-align: initial; line-height: initial;">Cheers,</span></div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"><span style="font-family: Calibri, 'Slate Pro', sans-serif; font-size: initial; text-align: initial; line-height: initial;">Albert</span></div> <div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"><br style="display:initial"></div> <div style="font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"></div> <table width="100%" style="background-color:white;border-spacing:0px;"> <tbody><tr><td colspan="2" style="font-size: initial; text-align: initial; background-color: rgb(255, 255, 255);"> <div id="_persistentHeader" style="border-style: solid none none; border-top-color: rgb(181, 196, 223); border-top-width: 1pt; padding: 3pt 0in 0in; font-family: Tahoma, 'BB Alpha Sans', 'Slate Pro'; font-size: 10pt;"> <div><b>Von: </b>David Larsson</div><div><b>Gesendet: </b>Dienstag, 23. Dezember 2014 18:01</div><div><b>An: </b>gate-users@lists.opengatecollaboration.org</div><div><b>Betreff: </b>[Gate-users] Incorrect voxel values - Interfile import GATE</div></div></td></tr></tbody></table><div style="border-style: solid none none; border-top-color: rgb(186, 188, 209); border-top-width: 1pt; font-size: initial; text-align: initial; background-color: rgb(255, 255, 255);"></div><br><div id="_originalContent" style="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
P {margin-top:0;margin-bottom:0;}</style>
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Dear GATE-users,<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt"><br>
I am trying to implement a voxelized phantom into my GATE-simulations for the first time, but seem to encounter problems in the Interfile-read of my script.<br>
<br>
Using a simple imageconverter ((x)medcon) I've created a test-interfile (.h33 + .i33) with a 10x10x10 matrix with voxel values ranging from 0 to 10. The conversion seems to work fine, and when I open to generated interfile-set in a random image viewer (ImageJ/MATLAB)
I can see that the voxel values are preserved (ranging from 0 - 10).<br>
<br>
However, when I run my script I notice that the loader does not import the voxels as ranging from 0-10, instead I can see (through the error messages) that all voxels are given one value (in this specific case 9280). The original values and the corresponding
input structure is therefore lost.<br>
<br>
I've tried to compare my generated code to the (working) example with the hof_brain but cannot seem to understand the problem. I've provided the essential parts of the mac-files and the interfile-header of my testfile below. Can anyone identify what the problem
might be?<br>
<br>
----------------------------main.mac----------------------------------------<br>
<br>
# WORLD <br>
/gate/world/geometry/setXLength 400. cm<br>
/gate/world/geometry/setYLength 400. cm<br>
/gate/world/geometry/setZLength 400. cm<br>
<br>
# VOXEL PHANTOM<br>
<br>
/gate/world/daughters/name teststack<br>
/gate/world/daughters/insert fictitiousVoxelMap<br>
/gate/teststack/geometry/insertReader interfile<br>
/gate/teststack/interfileReader/insertTranslator range<br>
/gate/teststack/interfileReader/rangeTranslator/readTable attenuation_range.dat
<br>
/gate/teststack/interfileReader/rangeTranslator/describe 1<br>
/gate/teststack/interfileReader/readFile testintf.h33<br>
/gate/teststack/placement/setTranslation 0. 0. 0. mm<br>
/gate/teststack/placement/setRotationAxis 1 0 0<br>
/gate/teststack/placement/setRotationAngle 0 deg<br>
/gate/teststack/attachVoxelPhantomSD<br>
<br>
-------------------attenuation_range.dat--------------------------<br>
<br>
5<br>
0 1 Air false 0.0 0.0 0.0 0.0<br>
1 2 Water true 1.0 0.0 0.0 0.0<br>
2 3 Water true 1.0 0.0 0.0 0.0<br>
4 9280 Water true 1.0 0.0 0.0 0.2<br>
9280 9280 Air true 1.0 0.0 0.0 0.2 #This changed for visualisation of incorrect values<br>
<br>
------------------------- testintf.h33--------------------------<br>
<br>
!INTERFILE := <br>
!imaging modality := nucmed <br>
!originating system := (X)MedCon <br>
!version of keys := 3.3 <br>
date of keys := 1996:09:24 <br>
conversion program := (X)MedCon <br>
program author := Erik Nolf <br>
program version := 0.13.0 <br>
program date := 2013:06:23 <br>
; <br>
!GENERAL DATA := <br>
original institution := NucMed <br>
!data offset in bytes := 0 <br>
!name of data file := m000-testnew.i33 <br>
patient name := Unknown <br>
!patient ID := Unknown <br>
patient dob := 0000:00:00 <br>
patient sex := Unknown <br>
!study ID := Unknown <br>
exam type := Unknown <br>
data compression := none <br>
data encode := none <br>
organ := Unknown <br>
isotope := Unknown <br>
dose := 0 <br>
NUD/Patient Weight [kg] := 0.00 <br>
NUD/imaging modality := NM <br>
NUD/activity := 0 <br>
NUD/activity start time := 00:00:00 <br>
NUD/isotope half life [hours] := 0.000000 <br>
; <br>
!GENERAL IMAGE DATA := <br>
!type of data := Tomographic <br>
!total number of images := 10 <br>
study date := 0000:00:00 <br>
study time := 00:00:00 <br>
imagedata byte order := LITTLEENDIAN <br>
process label := <br>
; <br>
number of energy windows := 1 <br>
; <br>
energy window [1] := <br>
energy window lower level [1] := <br>
energy window upper level [1] := <br>
flood corrected := N <br>
decay corrected := N <br>
; <br>
!SPECT STUDY (general) := <br>
number of detector heads := 1 <br>
; <br>
!number of images/energy window := 10 <br>
!process status := Reconstructed <br>
!matrix size [1] := 10 <br>
!matrix size [2] := 10 <br>
!number format := long float <br>
!number of bytes per pixel := 8 <br>
scaling factor (mm/pixel) [1] := +10.000000e+00 <br>
scaling factor (mm/pixel) [2] := +10.000000e+00 <br>
!number of projections := 10 <br>
!extent of rotation := <br>
!time per projection (sec) := 0 <br>
study duration (sec) := 0 <br>
!maximum pixel count := +1.000000e+01 <br>
patient orientation := Unknown <br>
patient rotation := Unknown <br>
; <br>
!SPECT STUDY (reconstructed data) := <br>
method of reconstruction := Unknown <br>
!number of slices := 10 <br>
number of reference frame := 0 <br>
slice orientation := unknown <br>
slice thickness (pixels) := +10.000000e+00 <br>
centre-centre slice separation (pixels) := +1.000000e+00 <br>
filter name := Unknown <br>
filter parameters := Cutoff <br>
method of attenuation correction := measured <br>
scatter corrected := N <br>
oblique reconstruction := N <br>
!END OF INTERFILE :=<br>
<br>
----------------------------------------------------------------------------<br>
<br>
Best regards,<br>
<br>
David <br>
</div>
</div>
</div>
</div>
<br><!--end of _originalContent --></div></body></html>