Skip to content

Probability Map Viewer in single image analysis mode

Chris Churas edited this page May 9, 2017 · 16 revisions

This page provides a tutorial on running Probability Map Viewer in single image analysis mode which just performs probability map generation on a single tiled image using Image Magick convert utility.

Requirements to run this tutorial

  • Centos 6+, Ubuntu 12+, and most other linux distributions should work
  • Java 7+ (jdk to build)
  • Image Magick command line programs (namely convert)
  • Internet connection
  • Web browser. This tutorial was tested on Chrome 52 on Centos 7.2.
  • Wget
  • Singularity version 2.2+

Step 1) Install MATLAB compiled runtime

Instructions can be found here

Step 2) Download Probability Map Viewer

Instructions can be found here

Step 3) Tile image

This step downloads example.png and tiles it using ImageMagick's convert command

wget https://github.com/CRBS/segmenter/wiki/images/example.png
# If no wget or on Mac os try:
# curl -L https://github.com/CRBS/segmenter/wiki/images/example.png 
mkdir tiles
convert example.png -crop 128x128 -set filename:tile "r%[fx:page.y/128]_c%[fx:page.x/128]" +repage +adjoin "tiles/0-%[filename:tile].png"

Step 4) Launch Probability Map Viewer

java -jar probabilitymapviewer-2.4.0-SNAPSHOT-jar-with-dependencies.jar --inputimage ./tiles --disableanalyzingtile --imageheight 4000 --imagewidth 5500 --cores 1 --custom

Things to note about above command:

  • --imageheight and --imagewidth are set to the size of this example image. For larger images set accordingly.

  • --disableanalyzingtile turns off a feature in Probability Map Viewer that displays a lighter color overlay tile for the tiles that are currently being processed. Reason for this is some browsers (firefox) seem to cache this tile and never show the real probability map.

  • --cores sets the number or CHM segmentation jobs that can run concurrently. For 128x128 tiles (default) each CHM job can take a few hundred megabytes of memory so setting the --cores should take into account available memory and cores.

  • Additional probability map generators using [CHM][chm] or external algorithms can be added via --custom flag. See Probability Map Viewer Custom Flag for more information.

Step 5) View Probability Map Viewer in browser

Launch browser and go to: http://localhost:8080 which should bring a page that looks like the following:

initial page

Click on the layer icon (3 squares pancaked together in upper left corner) which can be seen in the image above.

Select the Base image radio button to display the tiled image as seen below:

image shown

Image should now be visible as seen below:

image shown

Step 6) Add CHM probability map generation

On left side of display click on Green plus sign icon to add a CHM probability map generation layer. Doing this will display a menu as seen below. Choose mitochrondrion_D8_L2_S2 Pick a color and click Add

add model

Step 7) Display CHM probability map generation

Click on layer icon again and click the checkbox for the newly added layer mitochrondion_D8_L2_S2 this should add the overlay as seen below:

overlay added

The solid colored overlays are those to be analyzed. After 10-20 seconds the probability maps will replace the solid colored overlays with probability maps as seen below:

some probability maps

To shutdown Probability Map Viewer click the red power icon in the browser or in the window the Probability Map Viewer jar was invoked hit Ctrl c