Skip to content

Blockfs to deep zoom translator for the chunglab website.

License

Notifications You must be signed in to change notification settings

chunglabmit/chunglab_dz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chunglab_dz

Deep zoom files for the Kwanghun Chung Lab

This is a utility for creating deep zoom files for the mousebrain website. The inputs are a blockfs volume and an alignment to the reference volume and a layout.json file that coordinates what planes are generated and the outputs are deep zoom directories and XML files.

layout.json

The format of layout.json is a list of dictionaries. Each dictionary defines a plane to be created. The keys to the dictionary are:

  • axes: either "xy", "xz" or "yz" to pick either the xy, xz or yz plane for output

  • plane: the coordinate perpendicular to the plane defined by axes

  • name: the name of the output file within the root directory

  • magnification (optional - default=10): the magnification of the reference coordinates, for instance a magnification of 10 gives one pixel every 10th of a coordinate in the reference coordinate frame.

  • tile_size (optional - default=254): the size of each image tile

  • tile_overlap (optional - default=1): the amount of overlap beetween tiles

  • tile_format (optional - default=jpg): the image file format

see layout.json for an example.

chunglab-dz command

The chunglab-dz command creates deep zoom files according its layout file, warping them to the atlas reference using an alignment. It optionally creates a composite color image by combining all of the input channels.

Usage:

chunglab-dz \
  --src <precomputed-blockfs-file> \
  [--src <precomputed-blockfs-file>] \
  [--src <precomputed-blockfs-file] \
  --dest <dest-directory> \
  [--dest <dest-directory>] \
  [--dest <dest-directory>] \
  --alignment <alignment-file> \
  --reference <reference-volume> \
  --layout-file <layout-file> \
  [--n-cores <n-cores>] \
  [--clip <clip>] \
  [--clip <clip>] \
  [--clip <clip>] \
  [--combine] \
  [--skip-if-present]

where

  • precomputed-blockfs-file is the path to the precomputed.blockfs file for the volume. This can be specified up to three times for the red, green an blue channels of the combined volume.

  • dest-directory is the path to the root directory for deep zoom files. It can be specified up to three times for the three possible channels. Paths in the layout-file are relative to this directory.

  • alignment-file is the alignment JSON file that aligns the volume to the reference, e.g. as generated by nuggt-align and rescale-alignment-file.

  • reference-volume is the reference volume that the alignment file targets, for instance /nature-protocols-2019-assets/atlas/autofluorescence_25_whole_sagittal.tif.

  • layout-file is the JSON layout file (see above for its format)

  • n-cores number of processes to use when working in parallel. Defaults to the number of cores on the machine being used.

  • clip the intensity at which to clip the image. Defaults to the full range. This should be specified once per channel.

  • --combine If present, create a composite image from all channels. This is named by taking the last folder from every channel's destination and concatenating them. For instance if the destinations are /path-to/pv and /path-to/td, the combine destination will be /path-to/pv+td.

  • --skip-if-present Don't create a deep zoom image if its .dzi file is present.

About

Blockfs to deep zoom translator for the chunglab website.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages