A wrapper to run Pixel.js
on top of Diva.js
as a job in the workflow builder Rodan
Clone this repo inside the rodan jobs
folder (rodan-docker/jobs
) using
git clone --recurse-submodules https://github.com/DDMAL/pixel_wrapper.git
git
(pre-2.13) and the above command fails, instead run
git clone https://github.com/DDMAL/pixel_wrapper.git
git submodule update --init --recursive
git submodule update --init --recursive
jobs/setting.py.job_development
to jobs/settings.py
.jobs/settings.py
in a text editor. You'll need to do two things:
RODAN_JOB_PACKAGES = (
"rodan.jobs.pixel_wrapper",
# Paths to other jobs
)
RODAN_RUNJOB_WORKING_USER_EXPIRY_SECONDS
(line 87) from 15
to 150000
.RODAN_JOB_PACKAGES
, check if rodan.jobs.pil-rodan
is included in the job paths.
pil-rodan
is not in the list, clone https://github.com/DDMAL/pil-rodan.git to the jobs folder, like in the first step and add its path to the list of rodan job packages like so:
RODAN_JOB_PACKAGES = (
"rodan.jobs.pixel_wrapper",
"rodan.jobs.pil-rodan",
# Paths to other jobs
)
docker-compose.job-dev.yml
and replace both occurences of demojob
with pixel_wrapper
.python activate_wrapper.py
in terminal to activate the wrapper within Pixel.js
.source/js/plugins/pixel.js
run ./pixel.sh
in terminal to install all dependencies and compile the project.docker-compose -f docker-compose.yml -f docker-compose.job-dev.yml up
Here are some user-level instructions on adding a pixel.js job in RODAN.
localhost:9002
Diva - Pixel.js
-> AddLayers {1, 2, 3}
as input ports, then you must have Layers {0, 1, 2, 3, 4}
as output ports. Layer 0
is already enabled by default, so you'd just need to enable the other 4.Sometimes changes need to be done to the wrapper code found in source/js/plugins/pixel-wrapper.js
, or the Pixel.js
source code in source/js/plugins/Pixel.js
.
If this is the case, make sure to run gulp develop:rodan
from the pixel_wrapper
directory after making any changes. This will compile the source code and move it to the static folder, which is used to upload the code to the server running Rodan. You won't need to restart Rodan.
If you make any changes to the css files, you'll need to move them manually the pixel_wrapper/static/css
folder.
Unit testing for Pixel Wrapper is done using Selenium, and requires a web browser (FireFox, make sure you have the latest version if already installed), and its driver (geckodriver
).
geckodriver
, place it in your system PATH, perhaps like so
mv ~/Downloads/geckodriver /usr/local/bin
pixel-wrapper.test.js
file in source/js/plugins
in order to add/remove/alter existing tests. gulp
. It must be running for the unit tests to work. You should either run it as a background process (gulp &
), or in another terminal. npm test
.This wrapper changes some of the functionality inherited from the standalone Pixel.js
, as well as introducing some new ones.
Pixel.js
job; if none, then the user will be prompted and must accurately determine the number of layers to classify.Pixel.js
job. The user should use this layer to select the regions of the page that they will classify, and should stick to within these regions.