MDL Usage

From FarsightWiki
(Difference between revisions)
Jump to: navigation, search
(Code Components)
(Code Components)
Line 15: Line 15:
 
<blockquote>''It is an iterative method that can produce smooth results while keeping useful edge structures. <br />
 
<blockquote>''It is an iterative method that can produce smooth results while keeping useful edge structures. <br />
 
Input and output: 3D image volume <br />
 
Input and output: 3D image volume <br />
sizeX, sizeY, sizeZ: volume dimension of X, Y and Z
+
sizeX, sizeY, sizeZ: volume dimension of X, Y and Z <br />
 
threshold: not used
 
threshold: not used
 
</blockquote>''
 
</blockquote>''

Revision as of 22:50, 1 July 2009

File Formats

filename.raw: 3D volume dataset with dimension indicated by the filename (x*y*z), with no header.
filename.seed: text file with high curvature seed points, which contains a list of 3D points.
filename.skel: text file with skeleton points, which contains a list of 3D points.
filename.swc: file format to describe dendritic morphology. The branches of a dendritic tree are represented as a set of cylinders.
filename.vtk: common vtk format, which contains MDL skeleton output.

Code Components

Example of program results of skeleton points, backbone extraction and dendritic tree. (A) Original 3D image on 2D z-projection, (B) 3D Skeleton points after path-line formation method, (C) Extracted dendritic backbone, (D) Resultant dendritic tree of MDL backbone and spine models.


  • AnisoDiffuse: Image smoothing algorithm – Anisotropic Diffusion
It is an iterative method that can produce smooth results while keeping useful edge structures.
Input and output: 3D image volume
sizeX, sizeY, sizeZ: volume dimension of X, Y and Z
threshold: not used
Usage: AnisoDiffuse <input file> <sizeX> <sizeY> <sizeZ> <output file> <threshold>
  • ConnComntwFldfill: Connected component analysis algorithm with flood filling method (to prevent from memory outflow problem)
Compute Connected Component with Flood filling method DepthFirstSearch may cause stack overflow for large datasets.
Input and output: 3D image volume
Usage: ConnComntwFldfill <input file> <sizeX> <sizeY> <sizeZ> <output file> <threshold>


  • ConnectComponents: Connected component analysis algorithm with scanline filling method
Label the connected components of the input volume with zero background and remove the connected components with small number of voxels.
Input: original volume
Output: removed small objects
Usage: ConnectComponents <input file> <sizeX> <sizeY> <sizeZ> <output file> <threshold>
  • Floodfill: Image floodfill algorithm
Flood filling accept a sequence of volumes. Input data contains either 0 or values greater or equal to 3.
Input and output: 3D image volume
Usage: Floodfill <input file> <sizeX> <sizeY> <sizeZ> <sizeTime> <output file> <threshold>
  • GradientVecField: Computing gradient vector field from intensity images
Compute the gradient vector field of any 3D intensity map.
Input : 3D volume density map with any sizes
Output: ASCII file with vector 3 components for all object voxels
Usage: GradientVecField <volfile> <xs> <ys> <zs> <outfile>
  • Skel_Extrvalley3D: Computing high curvature seed points
Extract the ridges and valleys feature in 3D vector field
Input: 3D vector field
Output: 3D image-scalar field
Usage: Skel_Extrvalley3D <Input vectors> <xs> <ys> <zs> <Output scalars>
  • Skel_streamline: Producing 3D skeleton points from vector field and seed points
Form path-lines from saddle points and seed points
Input: 1. 3D vector field
2. Seed points
Output: skelelton file
Usage: Skel_streamline <vector file> <xs> <ys> <zs> <seeds file> <out skel>
  • MinSpanTree: MDL algorithm for graph (tree) generation
Generate MDL graph structure from a list of 3D points.
Input format: .skel (3D points)
Output format: .swc or .vtk (3D graph format)
Usage: MinSpanTree <vector file> <xs> <ys> <zs> <seeds file> <out skel>
  • VolumeProcess: Image preprocessing algorithms (including image operations, crop, scale, etc.)
Volume dataset processing accepts a sequence of volumes
Input parameters
1. sizeExpand
2. preproess
Usage: VolumeProcess <input file> <sizeX> <sizeY> <sizeZ> <sizeTime> <output file> <threshold>

Python Wrapping

This python code gives an example of program run on dataset MBFsp5 with dimension x-308, y-512 and z-49.

#!/usr/bin/env python
import os
data_dir = "/projects/MDLCode/zackdata"
os.system("volumeProcess/volumeProcess  %s/MBFsp5.308x512x49.raw  308 512 49 1 %s/volume_Processed.raw 2" % (data_dir, data_dir))
os.system("ConnCompntwFldfill/ConnCompntwFldfill %s/volume_Processed.raw 308 512 49 %s/components_Connected.raw 100" % (data_dir, data_dir))
os.system("AnisoDiffuse/AnisoDiffuse  %s/components_Connected.raw 308 512 49 %s/Aniso_Diffused.raw 0" % (data_dir, data_dir))
os.system("GradientVecField/GradientVecField %s/Aniso_Diffused.raw 308 512 49  %s/out.vec" % (data_dir, data_dir))
os.system("skel_Extrvalley3D/skel_Extrvalley3D %s/out.vec 308 512 49 %s/out.seed" % (data_dir, data_dir))
os.system("skel_streamline/skel_streamline %s/out.vec 308 512 49 %s/out.seed %s/out.skel" % (data_dir, data_dir, data_dir))
os.system("MinSpanTree/MinSpanTree %s/ out.skel components_Connected.raw 308 512 49 %s/out.vtk out.txt %s/Aniso_Diffused.raw" % (data_dir, data_dir, data_dir))
Personal tools