[Gate-users] GATE cannot find interfile data from header
Marc Chamberland
MarcChamberland at cmail.carleton.ca
Thu Sep 6 14:26:15 CEST 2012
Hi Gate Users!
In Gate v6.2, the Interfile reader code changed a little bit. So the files that I sent in the previous message (see below) will not work directly in Gate v6.2.
Instead, use the following files and recompile Gate.
Also, please let me know if these don't quite work as expected.
Cheers!
Marc
__________________________
Marc Chamberland, MSc
PhD candidate
Department of Physics
Carleton University
Ottawa (ON)
Le 2012-08-30 à 10:23 AM, Marc Chamberland <marcchamberland at cmail.carleton.ca> a écrit :
> Hi Tristan!
>
> Concerning your Interfile reader issue: please try out these four modified files. The two Geometry ones go into [your Gate path]/source/geometry/ and the two Source ones go into [your Gate path]/source/physics (place the headers and source files in their respective sub-directories). Recompile Gate.
>
> This should automatically extract the sub-directory path from the Interfile header name you put in your macro. Then, you won't need to modify your Interfile headers.
>
> It works on my system; hopefully it works on yours too!
>
> Cheers!
> Marc
>
>
>
> __________________________
>
> Marc Chamberland, MSc
> PhD candidate
> Department of Physics
> Carleton University
> Ottawa (ON)
>
> Le 2012-08-30 à 9:23 AM, Marc Chamberland <MarcChamberland at cmail.carleton.ca<mailto:MarcChamberland at cmail.carleton.ca>>
> a écrit :
>
> That's a good point.
>
> Hopefully, someone from the Open Gate Collaboration will fix this in v6.2.1!
>
> Marc
>
>
>
> __________________________
>
> Marc Chamberland, MSc
> PhD candidate
> Department of Physics
> Carleton University
> Ottawa (ON)
>
> Le 2012-08-30 à 9:17 AM, Tristan Glatard <tristan.glatard at creatis.insa-lyon.fr<mailto:tristan.glatard at creatis.insa-lyon.fr><mailto:tristan.glatard at creatis.insa-lyon.fr>>
> a écrit :
>
> Hi Marc,
>
> Modifying the header files works, but it makes the image unreadable by other programs (e.g. xmedcon) that assume that the data is referred relatively to the header.
> This should be fixed in GATE I think. No show-stopper of course.
>
> Cheers,
> Tristan
>
> On 08/30/2012 03:09 PM, Marc Chamberland wrote:
> 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><mailto: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 <http://www.creatis.insa-lyon.fr/%7Eglatard>
> Tél : +33 (0) 4 72 43 75 47
>
> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.opengatecollaboration.org<mailto:Gate-users at lists.opengatecollaboration.org><mailto:Gate-users at lists.opengatecollaboration.org>
> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
>
>
>
>
> --
> 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
>
>
> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.opengatecollaboration.org
> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
>
>
> <GateSourceVoxelInterfileReader.cc><GateGeometryVoxelInterfileReader.cc><GateGeometryVoxelInterfileReader.hh><GateSourceVoxelInterfileReader.hh>_______________________________________________
> Gate-users mailing list
> Gate-users at lists.opengatecollaboration.org
> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GateSourceVoxelInterfileReader.cc
Type: application/octet-stream
Size: 13111 bytes
Desc: GateSourceVoxelInterfileReader.cc
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20120906/50b157f2/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GateGeometryVoxelInterfileReader.hh
Type: application/octet-stream
Size: 2387 bytes
Desc: GateGeometryVoxelInterfileReader.hh
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20120906/50b157f2/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GateGeometryVoxelInterfileReader.cc
Type: application/octet-stream
Size: 15528 bytes
Desc: GateGeometryVoxelInterfileReader.cc
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20120906/50b157f2/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GateSourceVoxelInterfileReader.hh
Type: application/octet-stream
Size: 1542 bytes
Desc: GateSourceVoxelInterfileReader.hh
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20120906/50b157f2/attachment-0007.obj>
More information about the Gate-users
mailing list