Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/bpavie/DOG
Browse files Browse the repository at this point in the history
  • Loading branch information
bpavie committed Jun 10, 2015
2 parents 3b52a4d + 983903b commit 01c4109
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# DOG
A Jython script for [Fiji/ImageJ](https://github.com/fiji) to perform [Difference of Gaussians](http://en.wikipedia.org/wiki/Difference_of_Gaussians) on fluorescent stack and plot the result.

This script will open a single channel fluorescent stack, perform the Difference of Gaussians and then plot all found points with the orthoslice view

## Parameters available :
- cellDiameter : select the cell/nucleus diameter (in unit of the Image Stack)
- minPeak : min intensity for a peak to be considered
- plotType : plot Points, Icospheres or limit to the first 3495 points due to some slowdown with Icospheres
- cellIcosophere : size of the point/icosphere use to visualize each detected point.

## TODO:
- Apply 3D Watershed segmentation using the detected points has a seed (see [3D Watershed plugin](http://imagejdocu.tudor.lu/doku.php?id=plugin:segmentation:3d_spots_segmentation:start#d_watershed) )
- Allow multiple channels in the stack
- Add a dialog for the parameters
- Add interface to measure nucleus/cell parameters
9 changes: 7 additions & 2 deletions dog.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from loci.plugins import BF
from ij.io import OpenDialog
from ij import IJ, ImagePlus, ImageStack
from ij.process import ImageConverter
from ij.process import ImageConverter, AutoThresholder
from ij3d import Image3DUniverse
from javax.vecmath import Color3f, Point3f
from script.imglib.analysis import DoGPeaks
Expand Down Expand Up @@ -40,7 +40,7 @@
#Diameter in microns
cellDiameter=3.0
# The minimum intensity for a peak to be considered
minPeak=1000
minPeak=0
#Use point(1), icosphere(2), or icosphere but limited to the first 3495 points in X (3)
plotType=USE_POINT
# diameter Cell visualization
Expand All @@ -57,12 +57,17 @@
#Create the coordinate.txt file to ouput the point coordinate
coordinateFile = open(srcDir + "coordinate.txt", "w")
print "Created " +srcDir + "coordinate.txt"
# If minPeak is set to 0, set it to automatically.
if minPeak == 0:
minPeak = AutoThresholder().getThreshold("Percentile", imp.getStatistics().histogram);

#Get the pixel calibration
cal=imp.getCalibration()
#Set Gaussian Sigma parameters for the Difference of Gaussian
sigmaLarge=[cellDiameter/cal.pixelWidth,cellDiameter/cal.pixelHeight,cellDiameter/cal.pixelDepth]
sigmaSmall=[a/2 for a in sigmaLarge]
print "Cell Diameter: XY-%f Z-%f in pixel" % (cellDiameter/cal.pixelWidth, cellDiameter/cal.pixelDepth)
print "Minimum peak value: %f" % (minPeak)
print "Sigma Large : %f %f %f in pixel" % (cellDiameter/cal.pixelWidth, cellDiameter/cal.pixelHeight,cellDiameter/cal.pixelDepth)
print "Sigma Small : %f %f %f in pixel" % (cellDiameter/cal.pixelWidth/2, cellDiameter/cal.pixelHeight/2,cellDiameter/cal.pixelDepth/2)
#peaks=DoGPeaks(Red(ImgLib.wrap(imp)),sigmaLarge,sigmaSmall,minPeak,1)
Expand Down

0 comments on commit 01c4109

Please sign in to comment.