MedialAxisTransform is a project mainly written in C++ and C, it's free.
OpenCL implementation for Medial Axis Transforms
/*
MedialAxisTransform is a software application, that currently utilises OpenCL in order to do three dimensional image analysis. It is my hope that this package can be extended into a tool to be used by researchers in image processing and medical image analysis. Currently fully supported for MacOS X lion (10.7.1) and Linux. Aside from filtering MedialAxisTransform can apply planer visualisation or a marching cubes volumetric visualisation. Currently it does not apply a MedialAxisTransform, however the kernel can be adapted to, and will be as this project development progresses.
To build your system needs: cmake OpenCL OpenGL GLUT libpng
They can be installed here:
After you have these frameworks run my installer/uninstaller script. To install:
Open terminal
cd to the root MedialAxisTransform directory (where you found this README)
Invoke my installer script with: ./Make.sh Wait for it to finish and done!
Note: If you don't have executable permissions, just type chmod u+x Make.sh
If my script stuffed up or there was a compilation/linker error, you can try with stages manually: cd (to directory where this README lives) cd build cmake .. If cmake dosn't build properly it's probably an OpenCL.dylib dependency it can't find. Please contact me so I can fix it! :) Assuming cmake runs fine, stay in terminal and type make Again if that dosn't run, sorry, let me know! Assuming it does work, the binary is located in the directory MedialAxisTransform/ with the name MedialAxisTransform.
To uninstall:
simply enter into terminal:
./Make.sh clean
To run:
MedialAxisTransform needs an input data set of type PNG rgba. You can convert from any image file type to PNG using ImageJ/Fiji, located here:
Unfortunatly ImageJ/Fuji will not let you explicitly output to rgba only rgb. If you check out my other repositiories on github (BeauJoh) I have a RGBA batch converter located there.
Once you have an image set (a stage of PNG rgba images) they need to have a similar naming convention, (numerically ascending) either starting at 0 or 1, they will be loaded and stored in sequence. Specify image stack with the flag -i followed by a link to the image stack:
./binary -i /images/in.png
(this is assuming that all images are stored in sequence as in0.png, in1.png, in2.png...etc)
You specify an output very much the same way, the flag is -o.
./binary -o /outImages/out.png
If files with the same name exist they are overriden.
You specify the kernel with the flag -k, this is the code that OpenCL uses, and where the 3D Sobel filter is stored. Changing the name of the kernel function loaded off the kernel is not so easy yet. As I have been to lazy to focus on usability (sorry).
Putting it all together:
an example of running the project is:
./binary -k MedialAxisTransform/my_kernel.cl -i DataResources/High-Res-Stage-24-Take-4/out.png -o DataResources/output/result.png
Enjoy!
If you have any questions, suggestions or oppinions, please let me know.
Beau Johnston
email: [email protected]
twitter: BeauJoh