Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Aliaksandr Halavatyi
AutoMicTools
Commits
8b826a93
Commit
8b826a93
authored
Dec 23, 2020
by
Aliaksandr Halavatyi
Browse files
distabce filter to 3D reference object
parent
b56615a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
pom.xml
View file @
8b826a93
...
...
@@ -14,7 +14,7 @@
-->
<groupId>
embl.almf
</groupId>
<artifactId>
AutoMicTools_
</artifactId>
<version>
1.1.1
7
-SNAPSHOT
</version>
<version>
1.1.1
8
-SNAPSHOT
</version>
<name>
plugins/AutoMicTools_.jar
</name>
<description>
Collection of tools for automated (feedback) microscopy data acquisition and analysis
</description>
...
...
src/main/java/automic/utils/roi/RoiFilter3D.java
View file @
8b826a93
...
...
@@ -290,6 +290,31 @@ public class RoiFilter3D {
}
public
void
filterDistanceRefObject
(
Object3D
_referenceObject
,
double
_minDistance
,
double
_maxDistance
,
boolean
_inPixels
){
if
(
_referenceObject
==
null
){
if
(
Double
.
isInfinite
(
_maxDistance
))
return
;
else
{
this
.
setAllPassedFlags
(
false
);
return
;
}
}
double
distance
;
Object3D
targetObject
;
for
(
int
i
=
0
;
i
<
nObj
;
i
++){
if
(
Passed
[
i
]){
//check only those ROIs which were not filtered out before
targetObject
=
objects
.
getObject
(
i
);
if
(
_inPixels
)
distance
=
targetObject
.
distBorderPixel
(
_referenceObject
);
else
distance
=
targetObject
.
distBorderUnit
(
_referenceObject
);
Passed
[
i
]=(
distance
>=
_minDistance
)&&(
distance
<=
_maxDistance
);
}
}
}
private
void
setAllPassedFlags
(
boolean
_value
){
for
(
int
i
=
0
;
i
<
nObj
;
i
++)
Passed
[
i
]=
_value
;
...
...
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