MRI_Create_Synthetic_Spots_Tool - MontpellierRessourcesImagerie/imagej_macros_and_scripts GitHub Wiki
The tool creates images of 2D-spots for the evaluation and benchmarking of spot detection tools. Two populations of spots with different means and variations of the size can be created in the same image.
The source code in git-hub can be found here.
Getting Started
To install the tool save the file create_synthetic_spots_tool.ijm into the folder macros/toolsets of your FIJI installation.
Select the ''Create synthetic spots tool'' toolset from the >> button of the ImageJ launcher.
- A left-click on the first button runs the tool with the current parameters
- A right-click on the first button allows to modify the current parameter-set.
- the n-button allows to create a new parameter-set.
- the o-button allows to open a previously stored parameter-set.
Options
- The name of the current parameter-set is displayed. When no other parameter-set has been opened the parameter-set ''default'' is used.
- type: The type of the image, 8-bit, 16-bit or 32-bit.
- image size: the width and height of the image in pixel.
- background level: the basic background intensity.
- background noise: the standard deviation of the background.
- add gradient: if checked an intensity gradient is added to the image.
- gradient: to create a gradient, the sum of the x- and y-positions is multiplied by the given factor.
- number population 1: the number of spots in population 1
- number population 2: the number of spots in population 2
- mean diameter 1: the average diameter of the spots in population 1.
- mean diameter 2: the average diameter of the spots in population 2.
- stdDev diameter 1: the standard-deviation of the diameter of the spots in population 1.
- stdDev diameter 2: the standard-deviation of the diameter of the spots in population 2.
- intensity: the mean intensity of the spots.
- sigma convolution: the standard deviation of the Gaussian kernel with which the image is convolved.
- foreground noise: the standard deviation of the intensity of the spots.
- do not touch edges: if checked the created spots will not touch the borders of the image.
- create image: if checked the ground-truth image is created in addition to the spots-image.
Managing parameter-sets
When the parameters are modified they are automatically saved to a file in the folder csst in the ImageJ-base folder. When a new parameter-set is created with the n-button, it is saved to a new file. This new parameter-set will initially contain the values of the current parameter-set. You can open saved parameter-sets with the o-button.
Results
Running the tool will create three items:
- The spots image
- The ground-truth image This is a two-channel image. Channel 1 contains an indexed mask of the spots of population 1 and channel 2 an indexed mask of the spots of population 2.
- A table containing the following data:
- Class: the population to which the spot belongs
- XC, YC: the centre point of the spot
- Diameter: the diameter of the spot
- Radius: the radius of the spot
- Area: the area of the spot
Limitations
- The created images are 2D
- The creation will be slow for big images
- No PSF is used for the convolution, only a Gaussian
- Spots are created independently and the overlap can not be controlled