-show-scene gives empty/black image

26 views
Skip to first unread message

Linn Christin Bonaventure Norbom

unread,
Nov 14, 2022, 9:35:04 AM11/14/22
to HCP-Users
Dear experts,

I am attempting to use -"show-scene" to cycle through subjects in a QC effort. As an initial test I have created a template.scene for a single subject, and attempted to use show-scene in order capture an image of the scene. I get no errors, but when I open the .png file it is black. 

Code:  
${CARET7DIR}/wb_command -show-scene ${SCRIPT_DIR}/template.scene 1  ${OUTPUT}/${FILENAME}_all.png 1024 768 -use-window-size

I have also attempted to remove "-use-window-size" and employ different image sizes (where the image seems to change in size but still black) as well as "New Scene 1" instead of 1,  all with the same result.

Simply using wb_view ${SCRIPT_DIR}/template.scene  and then "capture image" from inside the workbench results in successful image creation. 

I have attached 2 screen shots of scene information and the terminal run.

Any ideas on what I might be doing wrong here is greatly appreciated!
Kind regards Linn 
Screenshot 2022-11-14 at 13.38.32.png
Screenshot 2022-11-14 at 14.18.11.png

Harwell, John

unread,
Nov 14, 2022, 10:02:56 AM11/14/22
to hcp-...@humanconnectome.org

Your command looks correct.  What is the output of “wb_command -version”?

 

When you captured an image of the scene inside of wb_view (File Menu -> Capture Image), were you able to save the captured image to a PNG file?  You could try a different image format (.jpg) with wb_command -show-scene.

 

There is a newer command for capturing images that you can try, wb_command -scene-capture-image.

 

John Harwell

 

From: Linn Christin Bonaventure Norbom <linnn...@gmail.com>
Date: Monday, November 14, 2022 at 8:35 AM
To: HCP-Users <hcp-...@humanconnectome.org>
Subject: [hcp-users] -show-scene gives empty/black image

* External Email - Caution *

--
You received this message because you are subscribed to the Google Groups "HCP-Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
hcp-users+...@humanconnectome.org.
To view this discussion on the web visit
https://groups.google.com/a/humanconnectome.org/d/msgid/hcp-users/c5bd5fa5-b665-42df-b55a-e9b2d98fcdf5n%40humanconnectome.org.

 


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Linn Christin Bonaventure Norbom

unread,
Nov 14, 2022, 2:50:21 PM11/14/22
to hcp-...@humanconnectome.org
OK great, 

Unfortunately no luck saving images as .jpg either, and yes I was able to save the image as .png when using (File Menu -> Capture Image) within the workbench. 
See attached for a screen shot of the output from wb_command -version (is it perhaps something to do with my compile?).

Also, if I attempt as suggested, and simply type  ${CARET7DIR}/wb_command -scene-capture-image 
I get the error: ERROR: the switch '-scene-capture-image' does not match any processing commands
And when attempting to use it in full code I get: ERROR: Command "-scene-capture-image" not found.
Unless I missed it I was not able to find any documentation on -scene-capture-image on https://www.humanconnectome.org/software/workbench-command but I am assuming it is because it is new. 

Thanks so much for the quick reply and aid!
Kind regards Linn 

Screenshot 2022-11-14 at 19.26.11.png

Harwell, John

unread,
Nov 14, 2022, 3:35:12 PM11/14/22
to hcp-...@humanconnectome.org

If you compiled the Workbench source code, it is probably a problem with your computer’s Mesa OpenGL library.  wb_view uses the (hardware) OpenGL libraries that are part of your graphics drivers.  So that wb_command -show-scene can be run without a display, it uses the Mesa OpenGL (software) libraries for generating the images. 

 

When you run ‘cmake’ to configure the Workbench source code, it will list the Mesa libraries found after “OSMESA:”.  Check that output to see what libraries were found.  You may want to check for updates to the Mesa package.

 

“-scene-capture-image” may not be in 1.5.0.

Linn Christin Bonaventure Norbom

unread,
Nov 15, 2022, 10:12:40 AM11/15/22
to hcp-...@humanconnectome.org
OK great I will have a look! Thanks so much for all the help.

Kind regards Linn 

Linn Christin Bonaventure Norbom

unread,
Nov 23, 2022, 4:33:54 PM11/23/22
to hcp-...@humanconnectome.org

Hello again,

 

I am sorry for not being able to investigate this immediately, but I have now run a new cmake command (see first line in attached screenshot) and have attached the cmake output. I am a little unsure of what to search for here in regards to possibly having an outdated Mesa package, but could the “GLEW: No” be an issue?

Any input on whether anything looks suspicious or any clues regarding outdated Mesa in the information attached would be greatly appreciated!

 

Thanks so much for all the help!

 

Kind regards Linn   


On Mon, 14 Nov 2022 at 20:35, Harwell, John <jhar...@wustl.edu> wrote:
Screenshot 2022-11-22 at 14.20.31.png
Screenshot 2022-11-22 at 14.20.57.png
Screenshot 2022-11-22 at 14.20.46.png

Harwell, John

unread,
Nov 28, 2022, 10:03:15 AM11/28/22
to hcp-...@humanconnectome.org

GLEW:no is ok.  You should not need to specify GL and GLU in the linker flags.  I have never seen the GLVND vs Legacy warning but you might try each of them. 

 

One thing you can try is to use “ldd” on the wb_command binary executable.  Ldd will show the shared object libraries used by wb_command and in particular, which OpenGL libraries are used.

 

John Harwell

 

 

Linn Christin Bonaventure Norbom

unread,
Nov 28, 2022, 10:07:31 AM11/28/22
to hcp-...@humanconnectome.org
Ah OK great, will attempt this! If not, I believe I am close to getting the pre-compiled version to work for this specific purpose. 
Thanks so mcuh for all the help!

Kind regards Linn 

You received this message because you are subscribed to a topic in the Google Groups "HCP-Users" group.
To unsubscribe from this topic, visit https://groups.google.com/a/humanconnectome.org/d/topic/hcp-users/OeTCqxmZs00/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hcp-users+...@humanconnectome.org.
To view this discussion on the web visit https://groups.google.com/a/humanconnectome.org/d/msgid/hcp-users/BL3PR02MB90098B7915F9C06656E6BE03CA139%40BL3PR02MB9009.namprd02.prod.outlook.com.

Tim Coalson

unread,
Nov 28, 2022, 5:14:43 PM11/28/22
to hcp-...@humanconnectome.org
What distribution are you using?  If it is debian-based, another option to update workbench (beyond what the distribution provides) is the NeuroDebian repository:


There was also some work to get connectome-workbench into fedora.

Tim


Reply all
Reply to author
Forward
0 new messages