Download the workflows here
Many of these workflows are fairly complicated and would be time consuming to reproduce, follow the instructions here for how to import a workflow from the zip files on this site
If you load a workflow and get an error message, click on the details button. If it says 'Node ... not available' it means you need to update your 'Image Processing Extensions' follow the instructions below to perform this update: instructions
- If you cannot find the 'Salt and Pepper' node, this also means you are not using the latest Image Processing Extensions so update it as described above
-
Steps are shown in normal text, comments are shown in italics.
-
Knime Basics: here
-
Use workflow variables: here
Here we have the simple task of segmenting the calcified bone tissue from the air and background in the image
- Apply a threshold and then a morphological operation to segment the calcified tissue well
- Calculate the porosity (air) volume fraction for each threshold (hint: Image Features)
- Improve the images using morphological operations and recalculate the porosity (hint: Morphological Image Operations)
- Fill in all the holes and estimate the bone volume to total volume an important diagnostic metric in biomechanics (hint: Fill Holes)
- Total volume is not the total volume of image but rather the size of the bone inside the image
- Add a filtering block, which works best on these data?
Here we try a number of different thresholds to identify the bone better.
- Adjust the list of thresholds to cover a reasonable range
- Adjust the morphological operation to it produces the best result
- Add many more steps around the ideal value how does the curve look?
The cell segmentation takes the process one step further and tries to identify the cells by looking for holes inside the bone tissue.
- Adjust the threshold to the best value as determined before
- Adjust the iterations for the morphological operation in the Create Bone to fill the bone in better
- Adjust the settings in Create Cells to better segment the cells
- Check the results using the Interactive Segmentation Viewer
- Generate the report as a PDF
- Make a plot of the X position against the maximum intensity, is there any trend? What might this be from?
- Optional: Add 'Haralick' feature analysis to the output, plot some of the parameters against position
KNIME is not the tool for everything, and we won't spend too much time on the others but
- FIJI (ImageJ with all the plugins already installed): Visualization, Preprocessing, Segmentation, Morphometrics [http://www.fiji.sc]
- Paraview
- ImageJ Plugins (Java and Python)
From Paleontology Paper
- Folder: Gut-PhilElvCropped
- Load into FIJI
- Rescale Brightness and Contrast
- Visualize
- Perform Threshold
- Visualize
- Load into FIJI
- Adjust brightness and contrast
- Visualize
- Perform Threshold
- Visualize
- Count the number of teeth
- What is ParaView
- parallel, distributed image processing and visualization toolbox written in C++
- open source, extendable API
- pipeline style analyses
Video Instructions Additional more detailed Web Instructions
- Load Data in
- Apply a threshold
- Visualize the segmentation
- Crop the image
- Experiment with other features
- Java classes, but with a well-developed API and GUI wrapped around it
- Can be imported and run in KNIME or ImageJ2/FIJI
- Powerful flexible framework behind: ImgLib2, examples
@Plugin(headless = true, type = Command.class)
public class DemoPlugin<T extends RealType<T>>
implements Command {
@Override
public void run() {
// Code for your plugin
}
}
public void run() {
final RealSum realSum = new RealSum();
long count = 0;
for ( final T type : input ) {
realSum.add( type.getRealDouble() );
count++;
}
return realSum.getSum() / count;
}
- Can be "recorded" like Macro's to call other functions or plugins
- Examples
- Filters in 3D
- Fast 3D Filters - native libraries allow for really fast implementations
public class My_Plugin implements PlugIn {
public void run(String arg) {
// Code for your plugin
}
}
-
Plugins
$\rightarrow$ New$\rightarrow$ Plugin, Download
public void run(String arg) {
ImagePlus imp = IJ.getImage();
ImageStack is = imp.getStack();
int n_slices = is.getSize();
for(int sliceIndex=1;sliceIndex<=n_slices;sliceIndex++) {
double sumVal=0;
long countPixel=0;
ImageProcessor curSlice=is.getProcessor(sliceIndex);
float[][] sliceArray=curSlice.getFloatArray();
for(int x=0;x<sliceArray.length;x++) {
for(int y=0;y<sliceArray[x].length;y++) {
sumVal+=sliceArray[x][y];
countPixel+=1;
}
}
IJ.log("Slice:"+sliceIndex+", Mean:"+sumVal/countPixel);
}
}
-
New
$\rightarrow$ Script, then Language$\rightarrow$ Python, Download
image = WindowManager.getCurrentImage()
stack = image.getStack() # get the stack within the ImagePlus
n_slices = stack.getSize() # get the number of slices
# iterate over every slice
for sliceIndex in range(1,n_slices+1):
curSlice=stack.getProcessor(sliceIndex)
sumVal=0;countPixel=0
# iterate over every pixel in the slice
for cPixel in curSlice.toFloatArrays()[0]:
sumVal+=cPixel
countPixel+=1
IJ.log("Slice:"+str(sliceIndex)+", Mean:"+str(sumVal/countPixel))