Thanks for your interest! If you use this code in your research, please cite it as Som S., Hagadorn J., Thelen W., Gillespie A., Catling D., Buick R. "Quantitative discrimination between geological materials with variable density contrast by high resolution X-ray computer tomography: an example using amygdule size-distribution in ancient lava flows." Computers & Geosciences, 2012 Follow these steps to use the amygdule detection routine: 1)Place the folders "binaries", "ImageJ", "images" and "mfiles" in a directory. Place the file "xraytest.m" in that same directory - "images" contains the x-ray slices - "binaries" contains those same images but binarized by the code - "ImageJ" contains an old version of the ImageJ software. It will read the TIF files in the "binaries" folder to make a 3d reconstruction. Note: I had to convert the TIF to TIF (yes, that sounds weird..) using another software (e.g. Irfanview) for ImageJ to read the TIFs generated by matlab - "mfiles" contains the maltab m files that xraytest.m uses. 2)Launch matlab (matlab -nodesktop) from that directory 3)type "help xraytest" to read how to use the software 4)type xraytest in matlab to launch the GUI Hope this is useful! Disclaimer: Use the software at your own risk. Double check your results. I make no claim that it will work everytime for everything. I take no responsibility for your application. By making this code available online, I am not making myself available for product support. Like you I am very busy, so can help you if I have time and if I like you. Sanjoy Som 2013