Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ALMF
feedback-fly-embryo-crocker
Commits
0826c080
Commit
0826c080
authored
Sep 13, 2018
by
Aliaksandr Halavatyi
Browse files
fill pixels with 0 out of the well area on Low-zoom image
parent
d5dfcd79
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/feedback/fly/embryo/jobs/Job_SelectMultipleEmbryosAutoRotation.java
View file @
0826c080
...
...
@@ -88,9 +88,9 @@ public class Job_SelectMultipleEmbryosAutoRotation extends Job_Default{
private
double
embryoMinAR
=
1.8
;
private
double
embryoMaxAR
=
10.0
;
private
double
embryoMinCircularity
=
0.
0
;
private
double
embryoMinCircularity
=
0.
3
;
private
double
embryoMaxCircularity
=
1.0
;
private
double
embryoMinSolidity
=
0.
0
;
private
double
embryoMinSolidity
=
0.
7
;
private
double
embryoMaxSolidity
=
1.0
;
...
...
@@ -204,10 +204,15 @@ public class Job_SelectMultipleEmbryosAutoRotation extends Job_Default{
}
private
void
identifyEmbryos
(
ImagePlus
_embryoImage
)
throws
Exception
{
new
RankFilters
().
rank
(
_embryoImage
.
getProcessor
(),
embryoFluorFilterRadius
,
RankFilters
.
MEDIAN
);
ImageProcessor
embryoProcessor
=
_embryoImage
.
getProcessor
();
new
RankFilters
().
rank
(
embryoProcessor
,
embryoFluorFilterRadius
,
RankFilters
.
MEDIAN
);
this
.
showDebug
(
_embryoImage
,
"Image for embryo segmentation"
,
true
);
ImageProcessor
maskProcessor
=
new
MaximumFinder
().
findMaxima
(
_embryoImage
.
getProcessor
(),
watershedTolerance
,
embryoFluorThreshold
,
MaximumFinder
.
SEGMENTED
,
false
,
false
);
//exclude particles outside ROI by filling with 0
embryoProcessor
.
setColor
(
0
);
embryoProcessor
.
fillOutside
(
wellRoi
);
ImageProcessor
maskProcessor
=
new
MaximumFinder
().
findMaxima
(
embryoProcessor
,
watershedTolerance
,
embryoFluorThreshold
,
MaximumFinder
.
SEGMENTED
,
false
,
false
);
ImagePlus
watershedMaskImage
=
new
ImagePlus
(
"Embryo Mask Image"
,
maskProcessor
);
...
...
@@ -228,7 +233,7 @@ public class Job_SelectMultipleEmbryosAutoRotation extends Job_Default{
Roi
[]
identifiedRois
=
rm
.
getRoisAsArray
();
ParticleFilterer
embryoFilter
=
new
ParticleFilterer
(
_embryoImage
.
getProcessor
(),
identifiedRois
);
embryoFilter
.
filterInRoi
(
wellRoi
);
//
embryoFilter.filterInRoi(wellRoi);
exclude particles outside ROI by filling with 0 before
embryoFilter
.
filterThr
(
ParticleFilterer
.
MEAN
,
embryoMinMeanIntensity
,
embryoMaxMeanIntensity
);
embryoFilter
.
filterThr
(
ParticleFilterer
.
MEDIAN
,
embryoMinMedianIntensity
,
embryoMaxMedianIntensity
);
embryoFilter
.
filterThr
(
ParticleFilterer
.
ASPECT_RATIO
,
embryoMinAR
,
embryoMaxAR
);
...
...
@@ -330,7 +335,6 @@ public class Job_SelectMultipleEmbryosAutoRotation extends Job_Default{
jobCollection
.
addParameter
(
KEY_EMBRYO_MIN_SOLIDITY
,
null
,
embryoMinSolidity
,
ParameterType
.
DOUBLE_PARAMETER
);
jobCollection
.
addParameter
(
KEY_EMBRYO_MAX_SOLIDITY
,
null
,
embryoMaxSolidity
,
ParameterType
.
DOUBLE_PARAMETER
);
jobCollection
.
addParameter
(
KEY_EMBRYO_MAX_COUNT
,
null
,
embryoMaxCount
,
ParameterType
.
INT_PARAMETER
);
jobCollection
.
addParameter
(
KEY_WAIT_IMAGE_OPENING
,
null
,
imageOpeningTimeDelay
,
ParameterType
.
INT_PARAMETER
);
...
...
@@ -381,8 +385,8 @@ public class Job_SelectMultipleEmbryosAutoRotation extends Job_Default{
// start ImageJ
new
ImageJ
();
String
tblPth
=
"
Z:/halavaty/temp/20180622 auto test
"
;
String
tblFnm
=
"summary_test0
9
_.txt"
;
String
tblPth
=
"
X:\\group\\ALMFstuff\\Aliaksandr\\Crocker-fly-feedback\\20181
"
;
String
tblFnm
=
"summary_test0
1
_.txt"
;
Job_SelectMultipleEmbryosAutoRotation
testJob
=
new
Job_SelectMultipleEmbryosAutoRotation
();
testJob
.
initialise
(
null
,
"LZ.Image"
,
false
);
testJob
.
testJobMicTable
(
0
,
tblPth
,
tblFnm
);
...
...
src/main/java/feedback/fly/embryo/jobtests/Embryo_Selection_Tester.java
View file @
0826c080
...
...
@@ -7,7 +7,7 @@ import ij.plugin.PlugIn;
import
automic.online.jobs.TestJobGui
;
import
automic.utils.Utils
;
import
feedback.fly.embryo.jobs.Job_SelectMultipleEmbryosAuto
;
import
feedback.fly.embryo.jobs.Job_SelectMultipleEmbryosAuto
Rotation
;
...
...
@@ -23,7 +23,7 @@ public class Embryo_Selection_Tester implements PlugIn {
// }
try
{
TestJobGui
jobTester
=
new
TestJobGui
(
Job_SelectMultipleEmbryosAuto
.
class
,
"LZ.Image"
);
TestJobGui
jobTester
=
new
TestJobGui
(
Job_SelectMultipleEmbryosAuto
Rotation
.
class
,
"LZ.Image"
);
jobTester
.
initialiseGui
();
jobTester
.
runTest
();
}
catch
(
Exception
e
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment