ArtDock is a Docker image containing Babak Ardekani's Automatic Registration Toolbox for cross-compatibility and ease-of-usage.
The first step is actually installing Docker. One can easily download and install this from the Docker Desktop page by following instructions for respective platforms.
- Using terminal, change directory with
cd [clone directory]
- Then, build the dockerfile with
docker build -t artdock .
Until this repo is made availble on DockerHub, this is the only way to build this Docker image.
ARTDock can be called with a GUI using X11 window forwarding. Windows users can use Xming X Server for X11 forwarding, while Mac users can use XQuartz
The remaning portion of this section will show the steps to run art GUI on a Mac, using instructions posted on the page How to show X11 windows with Docker on Mac.
-
Install XQuartz with Homebrew
brew cask install xquartz
-
Open XQuartz with
open -a XQuartz
, then enable ‘Allow connections from network clients’ in XQuartz's preferences [Mac menu bar > XQuartz > Preferences > Security]. -
Quit and restart XQuartz for these settings to take effect.
-
Allow localhost for X11 forwarding:
xhost + 127.0.0.1
-
Run ARTDock with the
-e DISPLAY
flag:docker run -it --rm \ -e DISPLAY=host.docker.internal:0 \ artdock art2
Alternatively, you may execute the bash file with art2gui
to run
this command on Mac.
While ARTDock is in experimental stages, one can run ARTdock with the following syntax:
docker run -it --rm -v [folder to mount]:[mount point] artdock
This command will activate the container with contents of /[folder to mount]
in /[mount point]
. The three primary commands included in this Docker images are: 3dwarper
, applywarp3d
, and acpcdetect
.
One can run automated non-linear registration with the following command:
3dwarper -v -o [mount point]/output/transformed_img.nii -sub /[mount point]/input/subject.nii -trg /[mount point]/input/target.nii
A real transformation commad from activation to transformation is:
docker run -it --rm -v /Users/sid/Downloads/Mouse/data:/data artdock
3dwarper -v -acpc \
-o /data/out/w1t2m8.nii \
-sub /data/same_mice_T1_2/w1t2m8/rrdki_0.nii \
-trg /data/same_mice_T1_2/w1t1m8/rrdki_0.nii