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

Tristan Glatard tristan.glatard at creatis.insa-lyon.fr
Thu Aug 30 14:58:41 CEST 2012


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



More information about the Gate-users mailing list