Skip to content

Commit

Permalink
[feat] remove all imfill dependency, drop octave-image in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Dec 22, 2024
1 parent 96e0880 commit 2f2fb33
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 22 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/run_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Install dependencies
run: |
if [[ "$RUNNER_OS" == "Linux" ]]; then
sudo apt-get update && sudo apt-get install -y octave cmake libcgal-dev libsuperlu-dev libsuitesparse-dev libgmp-dev libtbb-dev octave-image
sudo apt-get update && sudo apt-get install -y octave cmake libcgal-dev libsuperlu-dev libsuitesparse-dev libgmp-dev libtbb-dev
elif [[ "$RUNNER_OS" == "macOS" ]]; then
brew install gnuplot
brew install octave
Expand All @@ -31,12 +31,6 @@ jobs:
7z x octave_5.2.0.7z -ooctave -y
echo "$PWD/octave/octave-5.2.0-w64-64/mingw64/bin" >> $GITHUB_PATH
fi
- name: Install octave-image (Windows)
if: ${{ runner.os == 'Windows' }}
run: octave-cli --eval "pkg install -forge image"
- name: Install octave-image (MacOS)
if: ${{ runner.os == 'MacOS' }}
run: octave-cli --eval "pkg install -forge image"
- name: Test linux32 binaries
if: ${{ matrix.os == 'ubuntu-24.04' }}
run: rm -rf bin/*.mexa64
Expand Down
2 changes: 1 addition & 1 deletion deislands2d.m
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@

% remote small islands of the background

cleanimg = imfill(cleanimg, 'holes');
cleanimg = fillholes3d(cleanimg);
end
15 changes: 2 additions & 13 deletions sample/demo_surf2vol_ex1.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,8 @@
bcutloop(isnan(bcutloop)) = []; % there can be multiple loops, remove the separators
plot(bcutpos(bcutloop, 2) * (1 / dstep), bcutpos(bcutloop, 1) * (1 / dstep), 'w');

if (isoctavemesh)
if (~exist('bwfill'))
pkg load image;
end

img2 = zeros(size(img), 'uint8');
for i = 1:size(img, 3)
img2(:, :, i) = bwfill(img(:, :, i), 'holes');
end
img2 = img2 + img;
else
img2 = imfill(img, 'holes') + img;
end
img2 = fillholes3d(img);

figure;
imagesc(squeeze(img2(:, :, zslice))); % z=10
hold on;
Expand Down
2 changes: 1 addition & 1 deletion surf2vol.m
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
% but the affine output is not correct in this case

if (jsonopt('fill', 0, opt) || label)
im = imfill(im, 'holes');
im = fillholes3d(im);
if (label)
im = cast(im, class(elabel)) * elabel(i);
end
Expand Down

0 comments on commit 2f2fb33

Please sign in to comment.