diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml index ad174ed..9c0e72c 100644 --- a/.github/workflows/run_test.yml +++ b/.github/workflows/run_test.yml @@ -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 @@ -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 diff --git a/deislands2d.m b/deislands2d.m index dd2306f..b091c68 100644 --- a/deislands2d.m +++ b/deislands2d.m @@ -54,5 +54,5 @@ % remote small islands of the background - cleanimg = imfill(cleanimg, 'holes'); + cleanimg = fillholes3d(cleanimg); end diff --git a/sample/demo_surf2vol_ex1.m b/sample/demo_surf2vol_ex1.m index 2a144df..ee56acd 100644 --- a/sample/demo_surf2vol_ex1.m +++ b/sample/demo_surf2vol_ex1.m @@ -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; diff --git a/surf2vol.m b/surf2vol.m index 6b34d95..db6e776 100644 --- a/surf2vol.m +++ b/surf2vol.m @@ -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