MDL Usage
From FarsightWiki
(Difference between revisions)
(→Code Components) |
(→Code Components) |
||
Line 16: | Line 16: | ||
Input and output: 3D image volume | Input and output: 3D image volume | ||
</blockquote>'' | </blockquote>'' | ||
+ | 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) | * ConnComntwFldfill: Connected component analysis algorithm with flood filling method (to prevent from memory outflow problem) | ||
Line 21: | Line 22: | ||
Input and output: 3D image volume | Input and output: 3D image volume | ||
</blockquote>'' | </blockquote>'' | ||
− | |||
Usage: ConnComntwFldfill <input file> <sizeX> <sizeY> <sizeZ> <output file> <threshold> | Usage: ConnComntwFldfill <input file> <sizeX> <sizeY> <sizeZ> <output file> <threshold> | ||
Line 29: | Line 29: | ||
Input: original volume <br /> | Input: original volume <br /> | ||
Output: removed small objects''</blockquote> | Output: removed small objects''</blockquote> | ||
+ | Usage: ConnectComponents <input file> <sizeX> <sizeY> <sizeZ> <output file> <threshold> | ||
* Floodfill: Image floodfill algorithm | * Floodfill: Image floodfill algorithm | ||
Line 34: | Line 35: | ||
Input and output: 3D image volume | Input and output: 3D image volume | ||
</blockquote>'' | </blockquote>'' | ||
+ | Usage: Floodfill <input file> <sizeX> <sizeY> <sizeZ> <sizeTime> <output file> <threshold> | ||
* GradientVecField: Computing gradient vector field from intensity images | * GradientVecField: Computing gradient vector field from intensity images | ||
Line 40: | Line 42: | ||
Output: ASCII file with vector 3 components for all object voxels | Output: ASCII file with vector 3 components for all object voxels | ||
</blockquote>'' | </blockquote>'' | ||
+ | Usage: GradientVecField <volfile> <xs> <ys> <zs> <outfile> | ||
* Skel_Extrvalley3D: Computing high curvature seed points | * Skel_Extrvalley3D: Computing high curvature seed points | ||
Line 46: | Line 49: | ||
Output: 3D image-scalar field | Output: 3D image-scalar field | ||
</blockquote>'' | </blockquote>'' | ||
+ | Usage: Skel_Extrvalley3D <Input vectors> <xs> <ys> <zs> <Output scalars> | ||
* Skel_streamline: Producing 3D skeleton points from vector field and seed points | * Skel_streamline: Producing 3D skeleton points from vector field and seed points | ||
Line 59: | Line 63: | ||
Output format: .swc or .vtk (3D graph format) | Output format: .swc or .vtk (3D graph format) | ||
</blockquote>'' | </blockquote>'' | ||
+ | Usage: MinSpanTree <vector file> <xs> <ys> <zs> <seeds file> <out skel> | ||
* VolumeProcess: Image preprocessing algorithms (including image operations, crop, scale, etc.) | * VolumeProcess: Image preprocessing algorithms (including image operations, crop, scale, etc.) | ||
Line 66: | Line 71: | ||
2. preproess | 2. preproess | ||
</blockquote>'' | </blockquote>'' | ||
+ | Usage: VolumeProcess <input file> <sizeX> <sizeY> <sizeZ> <sizeTime> <output file> <threshold> | ||
== Python Wrapping == | == Python Wrapping == |
Revision as of 01:42, 13 May 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
- 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
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
- 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))