Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RSF
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenSource
RSF
Commits
e7cbc2db
Commit
e7cbc2db
authored
1 month ago
by
ac
Browse files
Options
Downloads
Patches
Plain Diff
dark tubes with bright plate
parent
d0cbfa54
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/MATLAB/+RSF/darkTubes.m
+22
-8
22 additions, 8 deletions
src/MATLAB/+RSF/darkTubes.m
src/MATLAB/clusterExamples/goVideoDarkTubes.m
+18
-7
18 additions, 7 deletions
src/MATLAB/clusterExamples/goVideoDarkTubes.m
with
40 additions
and
15 deletions
src/MATLAB/+RSF/darkTubes.m
+
22
−
8
View file @
e7cbc2db
function
im
fm
=
darkTubes
(
im
,
CONSTANTS
,
thickness
)
function
im
Out
=
darkTubes
(
im
,
CONSTANTS
,
thickness
In
)
thickness
=
abs
(
thicknessIn
);
voxelSize
=
CONSTANTS
.
imageData
.
PixelPhysicalSize
;
voxelSize
([
1
,
2
])
=
voxelSize
([
2
,
1
]);
% swap (x,y,z) to matlab column major (y,x,z)
vx
=
max
(
voxelSize
)
.
/
voxelSize
;
...
...
@@ -8,13 +9,26 @@ sigma = 1/sqrt(3) * (thickness ./ 2) * vx;
cudaTarget
=
getCudaTarget
;
imf
=
HIP
.
LoG
(
im
,
sigma
,
cudaTarget
);
if
thicknessIn
<
0
% bright plate
imn
=
imf
;
imn
(
imn
>
0
)
=
0
;
imn
=
abs
(
imn
);
sigmaPlate
=
[
5
,
1
,
1
]
.*
sigma
;
imfPlate
=
HIP
.
LoG
(
imn
,
sigmaPlate
,
cudaTarget
);
imnPlate
=
imfPlate
;
imnPlate
(
imnPlate
>
0
)
=
0
;
imnPlate
=
abs
(
imnPlate
);
imnPlate
=
imnPlate
.*
imregionalmax
(
imnPlate
);
imOut
=
imnPlate
;
else
% dark blob
imp
=
imf
;
imp
(
imp
<
0
)
=
0
;
imfm
=
fibermetric
(
imp
);
imfm
=
imfm
.*
imregionalmax
(
imfm
);
% imfm = RSF.clipRSF(imfm);
imOut
=
imfm
;
end
4
;
...
...
This diff is collapsed.
Click to expand it.
src/MATLAB/clusterExamples/goVideoDarkTubes.m
+
18
−
7
View file @
e7cbc2db
...
...
@@ -37,8 +37,17 @@ imfmX = imfm.*imregionalmax(imfm);
% imp = imp .* imregionalmax(imp,6);
% imn = imn .* imregionalmax(imn,6);
sliceThickness
=
100
;
for
Z
=
sliceThickness
:
1
:
size
(
im
,
1
)
-
sliceThickness
% bright plate
sigmaPlate
=
[
5
,
1
,
1
]
.*
sigma
;
imfPlate
=
HIP
.
LoG
(
imn
,
sigmaPlate
,
cudaTarget
);
imnPlate
=
imfPlate
;
imnPlate
(
imnPlate
>
0
)
=
0
;
imnPlate
=
abs
(
imnPlate
);
imnPlateX
=
imnPlate
.*
imregionalmax
(
imnPlate
,
6
);
sliceThickness
=
10
;
bClear
=
true
;
for
Z
=
100
:
1
:
size
(
im
,
1
)
-
100
clipLimits
=
[];
clipLimits
.
dim
=
1
;
...
...
@@ -50,13 +59,15 @@ for Z = sliceThickness: 1 :size(im,1)-sliceThickness
im2
=
getClipFrame
(
imn
,
clipLimits
);
im3
=
getClipFrame
(
imp
,
clipLimits
);
im4
=
getClipFrame
(
imfm
,
clipLimits
);
im5
=
getClipFrame
(
imfmn
,
clipLimits
);
im6
=
getClipFrame
(
imraw
,
clipLimits
,
gray
());
im7
=
getClipFrame
(
imfmX
,
clipLimits
);
imOut
=
[
im1
,
im2
,
im7
;
im6
,
im3
,
im4
];
if
sliceThickness
==
Z
im8
=
getClipFrame
(
mat2gray
(
imnPlate
),
clipLimits
);
imOut
=
[
im6
,
im2
,
im8
;
im3
,
im4
,
im7
];
clf
;
imagesc
(
imOut
);
drawnow
title
(
num2str
(
Z
))
if
bClear
imwrite
(
imOut
,
outfile
);
bClear
=
false
;
else
imwrite
(
imOut
,
outfile
,
'writemode'
,
'append'
);
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment