Skip to content

Commit 2f2fb33

Browse files
committed
[feat] remove all imfill dependency, drop octave-image in ci
1 parent 96e0880 commit 2f2fb33

File tree

4 files changed

+5
-22
lines changed

4 files changed

+5
-22
lines changed

.github/workflows/run_test.yml

+1-7
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Install dependencies
2323
run: |
2424
if [[ "$RUNNER_OS" == "Linux" ]]; then
25-
sudo apt-get update && sudo apt-get install -y octave cmake libcgal-dev libsuperlu-dev libsuitesparse-dev libgmp-dev libtbb-dev octave-image
25+
sudo apt-get update && sudo apt-get install -y octave cmake libcgal-dev libsuperlu-dev libsuitesparse-dev libgmp-dev libtbb-dev
2626
elif [[ "$RUNNER_OS" == "macOS" ]]; then
2727
brew install gnuplot
2828
brew install octave
@@ -31,12 +31,6 @@ jobs:
3131
7z x octave_5.2.0.7z -ooctave -y
3232
echo "$PWD/octave/octave-5.2.0-w64-64/mingw64/bin" >> $GITHUB_PATH
3333
fi
34-
- name: Install octave-image (Windows)
35-
if: ${{ runner.os == 'Windows' }}
36-
run: octave-cli --eval "pkg install -forge image"
37-
- name: Install octave-image (MacOS)
38-
if: ${{ runner.os == 'MacOS' }}
39-
run: octave-cli --eval "pkg install -forge image"
4034
- name: Test linux32 binaries
4135
if: ${{ matrix.os == 'ubuntu-24.04' }}
4236
run: rm -rf bin/*.mexa64

deislands2d.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@
5454

5555
% remote small islands of the background
5656

57-
cleanimg = imfill(cleanimg, 'holes');
57+
cleanimg = fillholes3d(cleanimg);
5858
end

sample/demo_surf2vol_ex1.m

+2-13
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,8 @@
4242
bcutloop(isnan(bcutloop)) = []; % there can be multiple loops, remove the separators
4343
plot(bcutpos(bcutloop, 2) * (1 / dstep), bcutpos(bcutloop, 1) * (1 / dstep), 'w');
4444

45-
if (isoctavemesh)
46-
if (~exist('bwfill'))
47-
pkg load image;
48-
end
49-
50-
img2 = zeros(size(img), 'uint8');
51-
for i = 1:size(img, 3)
52-
img2(:, :, i) = bwfill(img(:, :, i), 'holes');
53-
end
54-
img2 = img2 + img;
55-
else
56-
img2 = imfill(img, 'holes') + img;
57-
end
45+
img2 = fillholes3d(img);
46+
5847
figure;
5948
imagesc(squeeze(img2(:, :, zslice))); % z=10
6049
hold on;

surf2vol.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
% but the affine output is not correct in this case
6767

6868
if (jsonopt('fill', 0, opt) || label)
69-
im = imfill(im, 'holes');
69+
im = fillholes3d(im);
7070
if (label)
7171
im = cast(im, class(elabel)) * elabel(i);
7272
end

0 commit comments

Comments
 (0)