Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use the marching cubes algorithm. #13

Open
odinsbane opened this issue Sep 2, 2024 · 1 comment
Open

Unable to use the marching cubes algorithm. #13

odinsbane opened this issue Sep 2, 2024 · 1 comment

Comments

@odinsbane
Copy link

I made a simple program to try out the marching cubes algorithm.

    ImgOpener imgOpener = new ImgOpener();
    Img<UnsignedByteType> img = (Img<UnsignedByteType>) imgOpener.openImgs(
            new File(args[0]).getAbsolutePath() ).get(0);
    Cursor<UnsignedByteType> curse = Views.flatIterable(img).cursor();
    Mesh mesh = MarchingCubesRealType.calculate(img, 3);

On the call to 'calculate I get a no such method exception.

Exception in thread "main" java.lang.NoSuchMethodError: 'net.imglib2.RandomAccessibleInterval net.imglib2.view.Views.flatIterable(net.imglib2.RandomAccessibleInterval)'
at net.imglib2.mesh.alg.MarchingCubesRealType.mask(MarchingCubesRealType.java:77)
at net.imglib2.mesh.alg.MarchingCubesRealType.compute(MarchingCubesRealType.java:135)
at net.imglib2.mesh.alg.MarchingCubesRealType.calculate(MarchingCubesRealType.java:123)
at deformablemesh.experimental.Imglib2Mesh.main(Imglib2Mesh.java:23)

On line 77 it is getting a cursor object. I included that in my code. It works in my main method, but it doesn't work in the MarchingCubes algorithm.

@odinsbane
Copy link
Author

I was playing around with a minimal pom to reproduce the issue.

I changed this:

          <dependency>
		<groupId>net.imglib2</groupId>
		<artifactId>imglib2-mesh</artifactId>
		<version>1.1.0</version>
	</dependency>

To:

            <dependency>
		<groupId>net.imglib2</groupId>
		<artifactId>imglib2-mesh</artifactId>
	</dependency>

That caused version 1.0.0 to be downloaded. It seems like some sort of version conflict with the parent pom scijava 38.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant