MDL Usage
From FarsightWiki
(Difference between revisions)
(→Code Components) |
(→Code Components) |
||
Line 32: | Line 32: | ||
<blockquote>''Label the connected components of the input volume with zero background and remove the connected components with small number of voxels. <br /> | <blockquote>''Label the connected components of the input volume with zero background and remove the connected components with small number of voxels. <br /> | ||
Input: original volume <br /> | Input: original volume <br /> | ||
− | Output: removed small objects''</blockquote> | + | Output: removed small objects <br /> |
+ | sizeX, sizeY, sizeZ: 3D volume dimension of X, Y and Z <br /> | ||
+ | threshold: not used''</blockquote> | ||
Usage: ConnectComponents <input file> <sizeX> <sizeY> <sizeZ> <output file> <threshold> | Usage: ConnectComponents <input file> <sizeX> <sizeY> <sizeZ> <output file> <threshold> | ||
* Floodfill: Image floodfill algorithm | * Floodfill: Image floodfill algorithm | ||
<blockquote>''Flood filling accept a sequence of volumes. Input data contains either 0 or values greater or equal to 3.<br /> | <blockquote>''Flood filling accept a sequence of volumes. Input data contains either 0 or values greater or equal to 3.<br /> | ||
− | Input and output: 3D image volume | + | Input and output: 3D image volume <br /> |
+ | sizeX, sizeY, sizeZ: 3D volume dimension of X, Y and Z <br /> | ||
+ | threshold: connected components size | ||
</blockquote>'' | </blockquote>'' | ||
Usage: Floodfill <input file> <sizeX> <sizeY> <sizeZ> <sizeTime> <output file> <threshold> | Usage: Floodfill <input file> <sizeX> <sizeY> <sizeZ> <sizeTime> <output file> <threshold> |
Revision as of 02:30, 2 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
- 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: 3D 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
sizeX, sizeY, sizeZ: 3D volume dimension of X, Y and Z
threshold: connected components size
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
sizeX, sizeY, sizeZ: 3D volume dimension of X, Y and Z
threshold: not used
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
sizeX, sizeY, sizeZ: 3D volume dimension of X, Y and Z
threshold: connected components size
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))