Reputation: 312
i am new to imagej/fiji , i have an stack of images in .tif extension.
1.Load the Stack file ie., .tif file into ImageJ -- File -> Open -> Browse the Stack file(.tif)
2.Convert the Stack file of 16-bit image into 8-bit image-- Image -> Type -> select 8-bit
3.Apply Threshold on the 8-bit image-- Image -> Adjust -> Threshold
4.Now apply Segmentation with the plug-in “Segment blob in 3D Viewer” -- Plugins -> Segmentation -> Segment blob in 3D Viewer
5.Selection of a Seed Point -- plugins -> segmentation -> levelsets
6.Overlapping/Touching Cell Structures -- Process -> Binary -> Watershed
Analyze -> Analyze Particles -> Show -> Outlines -> Display Result
7.Applying the Skeletonize 3D -- Plugins -> Skeleton -> Skeletonize 3D
These tasks are achieved by doing each task individually . i want a single plugin that needs to do all this tasks at once. i don't know how to do this .. please someone help me.. i know we need to use ecllipse to write java code for plugin or macro ..i dont know how to achieve this tasks at once.
Upvotes: 0
Views: 485
Reputation: 191
For your task, it should be pretty easy to create a macro by recording your work flow instead of hard coding an ImageJ plugin. Start up the command recorder by [Plugins > Macros > Record...] and then follow the steps you described. In the recorder window, a command for each step will be printed.
After executing 7 steps you described, click "Create" button in the top right. There, you will see a text window with commands (ImageJ) or a script editor with commands (Fiji). All you need then is to re-open the image stack and test the macro by [Macros > Run Macro] (ImageJ) or click "Run" button (Fiji script editor).
For more details, see slide 11 - 15 in the PDF linked below.
http://cmci.embl.de/_media/documents/slides/elmi2012.pdf
Or read from page 17 to 22 in the textbook linked in the following page.
http://cmci.embl.de/documents/ijcourses#macro_programming_in_imagej
You might need minor modifications to the automatically recorded commands since your work flow is slightly compicated as you are using the output image of the [Analyze Particle...] command, but please first try without any change.
You could also include your macro as a menu item if you save the macro as a file (.ijm) and save it under
[ImageJ root]/plugins/Scripts/
In this case, the file name should include underscore(_) to let the file name be appearing as a menu item under [Plugins > Scripts >].
Upvotes: 1