[Gate-users] GATE cannot find interfile data from header

Marc Chamberland MarcChamberland at cmail.carleton.ca
Thu Aug 30 15:09:47 CEST 2012


Hi Tristan!

I took a look at the source code of the Interfile reader in Gate, and yes, you do need to include the sub-directory in the Interfile header.

If you look at the Time Activity Curve example included with Gate, you'll see that they include the sub-directory in the "name of data file" in the Interfile header.

I don't know if this qualifies as a bug or not, but I'd suggest you just work around it by modifying your header files (or moving them to your execution directory).

Marc



__________________________

Marc Chamberland, MSc
PhD candidate
Department of Physics
Carleton University
Ottawa (ON)


Le 2012-08-30 à 8:58 AM, Tristan Glatard <tristan.glatard at creatis.insa-lyon.fr<mailto:tristan.glatard at creatis.insa-lyon.fr>>
 a écrit :

Hi,

We have a macro involving a source in interfile format, stored in a subdirectory called "data":
[glatard at kingkong gate.sh-2294696198382639]$ grep phantom mac/adapted-mainMacro.mac  | grep -v \#
/gate/hof_brain/interfileReader/readFile data/brain_phantom.h33
/gate/source/voxel_brain/interfileReader/readFile data/brain_phantom.h33
The header of this interfile references the data relatively to the header path, i.e. without the subdirectory:
[glatard at kingkong gate.sh-2294696198382639]$ grep phantom data/brain_phantom.h33
!name of data file := brain_phantom.i33
[glatard at kingkong gate.sh-2294696198382639]$ ls data | grep phantom
brain_phantom.h33
brain_phantom.i33
GATE cannot find the data file:
[glatard at kingkong gate.sh-2294696198382639]$ ./Gate mac/adapted-mainMacro.mac 1>/dev/null
   [G4-cerr]
   [G4-cerr] Error: Could not open header file 'brain_phantom.i33'!
   [G4-cerr] ERROR - G4Box()::G4Box(): hof_brain_solid
   [G4-cerr]         Dimensions too small ! - 0, 0, 0
   [G4-cerr]
   [G4-cerr] *** G4Exception : InvalidSetup
   [G4-cerr]       issued by : G4Box::G4Box()
   [G4-cerr] Invalid dimensions. Too small.
   [G4-cerr] *** Fatal Exception *** core dump ***
   [G4-cerr]
   [G4-cerr] *** G4Exception: Aborting execution ***
Aborted
It works if we add the subdirectory to the data file name in the interfile header:
[glatard at kingkong gate.sh-2294696198382639]$ grep phantom data/brain_phantom.h33
!name of data file := data/brain_phantom.i33
[glatard at kingkong gate.sh-2294696198382639]$ ./Gate mac/adapted-mainMacro.mac 1>/dev/null
[glatard at kingkong gate.sh-2294696198382639]$ echo $?
0

Is it a bug in the interfile reader of GATE, or should we adjust interfile headers according to their location?

Thanks in advance, cheers,
Tristan

--
Tristan Glatard
CNRS researcher, CREATIS
http://www.creatis.insa-lyon.fr/~glatard
Tél : +33 (0) 4 72 43 75 47

_______________________________________________
Gate-users mailing list
Gate-users at lists.opengatecollaboration.org
http://lists.opengatecollaboration.org/mailman/listinfo/gate-users




More information about the Gate-users mailing list