[Gate-users] G4OpenGLXViewer problem
Marc Chamberland
MarcChamberland at cmail.carleton.ca
Wed Aug 28 23:43:13 CEST 2013
Hi again,
I have the same problem and the proposed solution also did not quite work for me.
Instead, it's probably better to use the Qt viewer. If you've installed Gate and Geant with Qt, then you can simply launch Gate this way:
>Gate --qt
The Qt viewer allows you to set up a GUI with commands. Here are the standard commands that I use everytime I launch Gate with Qt:
# draws the window with the box
/vis/open OGL 600x600-0+0
# draws the scene tree
/vis/drawVolume
#
# Viewer menu :
/gui/addMenu viewer Viewer
/gui/addButton viewer "Rebuild geometry" "/gate/geometry/rebuild"
/gui/addButton viewer "Set style surface" "/vis/viewer/set/style surface"
/gui/addButton viewer "Set style wireframe" "/vis/viewer/set/style wire"
/gui/addButton viewer "Refresh viewer" "/vis/viewer/refresh"
/gui/addButton viewer "Update viewer (interaction or end-of-file)" "/vis/viewer/update"
/gui/addButton viewer "Flush viewer (= refresh + update)" "/vis/viewer/flush"
/gui/addButton viewer "Update scene" "/vis/scene/notifyHandlers"
#
/gui/addMenu zoom Zoom
/gui/addButton zoom "10%" "/vis/viewer/zoomTo 0.1"
/gui/addButton zoom "50%" "/vis/viewer/zoomTo 0.5"
/gui/addButton zoom "100%" "/vis/viewer/zoomTo 1.0"
/gui/addButton zoom "150%" "/vis/viewer/zoomTo 1.5"
/gui/addButton zoom "200%" "/vis/viewer/zoomTo 2.0"
/gui/addButton zoom "500%" "/vis/viewer/zoomTo 5.0"
#
# W O R L D
#
/gate/world/geometry/setXLength 150. cm
/gate/world/geometry/setYLength 150. cm
/gate/world/geometry/setZLength 150. cm
/gate/geometry/setMaterialDatabase /Applications/gate_v6.2/GateMaterials.db
/vis/scene/add/axes
I would suggest you make a macro file out of those commands and execute it everytime you launch Gate with Qt.
Be aware that if you run your simulation with the Qt viewer open, the GUI will become unresponsive because of the single-threaded nature of the application.
Hope this helps!
Marc
__________________________
Marc Chamberland, MSc
PhD candidate
Department of Physics
Carleton University
Ottawa (ON)
On 2013-08-28, at 5:09 PM, Sonoko Nakano <snakano at sfu.ca>
wrote:
> Hi Gate users,
>
> I am still struggling with G4OpenGLXViewer problem.
> When I asked this question before, some kind people suggested me to install fonts.
> I have downloaded the package; sudo apt-get install gsfonts-x11
>
> My computer is Linux (Ubuntu). When I check my computer, there are:
>
> snakano at mirg5:~/GATE_GEANT4/gate_v6.2/benchmarks$ xlsfonts|grep adobe|grep courier
> -adobe-courier-bold-i-normal--0-0-0-0-p-0-iso8859-1
> -adobe-courier-bold-i-normal--0-0-0-0-p-0-iso8859-15
> -adobe-courier-bold-i-normal--0-0-0-0-p-0-iso8859-2
> -adobe-courier-bold-o-normal--0-0-0-0-p-0-iso8859-1
> -adobe-courier-bold-o-normal--0-0-0-0-p-0-iso8859-15
> -adobe-courier-bold-o-normal--0-0-0-0-p-0-iso8859-2
> -adobe-courier-bold-r-normal--0-0-0-0-p-0-iso8859-1
> -adobe-courier-bold-r-normal--0-0-0-0-p-0-iso8859-15
> -adobe-courier-bold-r-normal--0-0-0-0-p-0-iso8859-2
> -adobe-courier-medium-i-normal--0-0-0-0-p-0-iso8859-1
> -adobe-courier-medium-i-normal--0-0-0-0-p-0-iso8859-15
> -adobe-courier-medium-i-normal--0-0-0-0-p-0-iso8859-2
> -adobe-courier-medium-o-normal--0-0-0-0-p-0-iso8859-1
> -adobe-courier-medium-o-normal--0-0-0-0-p-0-iso8859-15
> -adobe-courier-medium-o-normal--0-0-0-0-p-0-iso8859-2
> -adobe-courier-medium-r-normal--0-0-0-0-p-0-iso8859-1
> -adobe-courier-medium-r-normal--0-0-0-0-p-0-iso8859-15
> -adobe-courier-medium-r-normal--0-0-0-0-p-0-iso8859-2
> -bitstream-courier 10 pitch-bold-i-normal--0-0-0-0-m-0-adobe-standard
> -bitstream-courier 10 pitch-bold-r-normal--0-0-0-0-m-0-adobe-standard
> -bitstream-courier 10 pitch-medium-i-normal--0-0-0-0-m-0-adobe-standard
> -bitstream-courier 10 pitch-medium-r-normal--0-0-0-0-m-0-adobe-standard
> snakano at mirg5:~/GATE_GEANT4/gate_v6.2/benchmarks$
>
>
> But when I run the command /control/execute vis.mac in Gate, I have the following error message, and I cannot view an image.
>
> [snakano at mirgserver Gate_26Aug_Line3]$ Gate
> [G4]
> [G4] *************************************************************
> [G4] Geant4 version Name: geant4-09-05-patch-02 (22-October-2012)
> [G4] Copyright : Geant4 Collaboration
> [G4] Reference : NIM A 506 (2003), 250-303
> [G4] WWW : http://cern.ch/geant4
> [G4] *************************************************************
> [G4]
> [Core-0] Initialization of geometry
> [Core-0] Initialization of physics
> [Core-0] Initialization of actors
> [Core-0]
> [Core-0] **********************************************************************
> [Core-0] GATE version name: gate_v6.2
> [Core-0] Copyright : OpenGATE Collaboration
> [Core-0] Reference : Phys. Med. Biol. 49 (2004) 4543-4561
> [Core-0] Reference : Phys. Med. Biol. 56 (2011) 881-901
> [Core-0] WWW : http://www.opengatecollaboration.org
> [Core-0] **********************************************************************
> [Core-0]
> Idle> /control/execute vis.mac
> G4OpenGLXViewer: XLoadQueryFont failed for font
> -adobe-courier-bold-r-normal--10-100-75-75-m-60-iso8859-1
> G4OpenGLXViewer: XLoadQueryFont failed for font
> -adobe-courier-bold-r-normal--11-80-100-100-m-60-iso8859-1
> G4OpenGLXViewer: XLoadQueryFont failed for font
> -adobe-courier-bold-r-normal--12-120-75-75-m-70-iso8859-1
> G4OpenGLXViewer: XLoadQueryFont failed for font
> -adobe-courier-bold-r-normal--14-100-100-100-m-90-iso8859-1
> G4OpenGLXViewer: XLoadQueryFont failed for font
> -adobe-courier-bold-r-normal--17-120-100-100-m-100-iso8859-1
> G4OpenGLXViewer: XLoadQueryFont failed for font
> -adobe-courier-bold-r-normal--18-180-75-75-m-110-iso8859-1
> G4OpenGLXViewer: XLoadQueryFont failed for font
> -adobe-courier-bold-r-normal--20-140-100-100-m-110-iso8859-1
> G4OpenGLXViewer: XLoadQueryFont failed for font
> -adobe-courier-bold-r-normal--24-240-75-75-m-150-iso8859-1
> G4OpenGLXViewer: XLoadQueryFont failed for font
> -adobe-courier-bold-r-normal--25-180-100-100-m-150-iso8859-1
> G4OpenGLXViewer: XLoadQueryFont failed for font
> -adobe-courier-bold-r-normal--34-240-100-100-m-200-iso8859-1
> WARNING: The vis manager will keep up to 10 events.
> This may use a lot of memory.
> It may be changed with, e.g., "/vis/scene/endOfEventAction accumulate 10".
> Idle>
>
> Does anyone know why I still get this error message?
>
> Thank you,
>
> Sonoko
>
>
>
>
>
> _______________________________________________
> 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