ANTsPy icon indicating copy to clipboard operation
ANTsPy copied to clipboard

Opening figures in docker

Open gaucijean opened this issue 3 years ago • 2 comments

I am using the docker image to test ANTs. I have a simple code that loads images and displays the loaded images. The code is the following:

`import ants

image = ants.image_read(ants.get_ants_data('r_16'))

ants.plot(image)`

The code works without any errors in docker. However, no figure opens. How do I open a figure through the terminal in docker?

gaucijean avatar Jul 07 '22 06:07 gaucijean

You would need to give the container access to your X11 server. I don't have a machine to test this on, but there's various guides online. I would recommend trying it with a simple test container first (something just containing x11-apps), then see if it works with ANTsPy.

cookpa avatar Jul 07 '22 15:07 cookpa

Thank you for your feedback! I'll try this and comment later on about how it went.

gaucijean avatar Jul 08 '22 06:07 gaucijean