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

Export Label Source as Scalar #495

Open
cmhulbert opened this issue Jul 24, 2023 · 4 comments
Open

Export Label Source as Scalar #495

cmhulbert opened this issue Jul 24, 2023 · 4 comments

Comments

@cmhulbert
Copy link
Collaborator

Currently possible via paintera-conversion helper, but should be possible from the UI.

@SteveNeustadter
Copy link

SteveNeustadter commented Aug 30, 2023

I am attempting to use paintera conversion helper via anaconda in the mac terminal, but am met with java related error messages. What workflow should I follow to import the N5 Data into a scalar N5 format to Fiji ImageJ so I can finalize a conversion to tiff image.

I should note that I am on an M2 Mac

@SteveNeustadter
Copy link

Error Listed here: Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
23/08/30 14:58:01 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Compression 'org.janelia.saalfeldlab.n5.blosc.BloscCompression' could not be registered because:
java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/y4/hjrd9kx10hlbdf64x61brzfr0000gn/T/jna-1434575083/jna16727122965266139432.tmp
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2633)
at java.base/java.lang.Runtime.load0(Runtime.java:768)
at java.base/java.lang.System.load(System.java:1837)
at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:947)
at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:922)
at com.sun.jna.Native.(Native.java:190)
at org.blosc.IBloscDll.(IBloscDll.java:15)
at org.blosc.JBlosc.init(JBlosc.java:30)
at org.blosc.JBlosc.(JBlosc.java:24)
at org.janelia.saalfeldlab.n5.blosc.BloscCompression.(BloscCompression.java:70)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at org.janelia.saalfeldlab.n5.CompressionAdapter.update(CompressionAdapter.java:82)
at org.janelia.saalfeldlab.n5.CompressionAdapter.getJsonAdapter(CompressionAdapter.java:166)
at org.janelia.saalfeldlab.n5.AbstractGsonReader.(AbstractGsonReader.java:58)
at org.janelia.saalfeldlab.n5.N5FSReader.(N5FSReader.java:116)
at org.janelia.saalfeldlab.n5.N5FSReader.(N5FSReader.java:136)
at org.janelia.saalfeldlab.label.spark.N5Helpers.n5Reader(N5Helpers.java:33)
at org.janelia.saalfeldlab.paintera.conversion.to.scalar.ToScalar$Companion.extract$lambda-3$lambda-1(ToScalar.kt:152)
at org.janelia.saalfeldlab.conversion.ExtractHighestResolutionLabelDataset.extract(ExtractHighestResolutionLabelDataset.java:209)
at org.janelia.saalfeldlab.conversion.ExtractHighestResolutionLabelDataset.extract(ExtractHighestResolutionLabelDataset.java:183)
at org.janelia.saalfeldlab.conversion.ExtractHighestResolutionLabelDataset.extractNoGenerics(ExtractHighestResolutionLabelDataset.java:170)
at org.janelia.saalfeldlab.paintera.conversion.to.scalar.ToScalar$Companion.extract(ToScalar.kt:150)
at org.janelia.saalfeldlab.paintera.conversion.to.scalar.ToScalar$Companion.access$extract(ToScalar.kt:127)
at org.janelia.saalfeldlab.paintera.conversion.to.scalar.ToScalar.call(ToScalar.kt:108)
at org.janelia.saalfeldlab.paintera.conversion.to.scalar.ToScalar.call(ToScalar.kt:15)
at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
at picocli.CommandLine.access$1300(CommandLine.java:145)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
at picocli.CommandLine.execute(CommandLine.java:2078)
at org.janelia.saalfeldlab.paintera.conversion.PainteraConvert$Companion.main(PainteraConvert.kt:36)
at org.janelia.saalfeldlab.paintera.conversion.PainteraConvert.main(PainteraConvert.kt)
Unable to extract scalar labels: /Labels does not exist in container N5FSReader[basePath=HealthyCell1.n5]

@axtimwalde
Copy link
Contributor

libblosc is missing, it looks like your are on Linux, so this should be easy, e.g.

sudo apt install libblosc1

@mkitti
Copy link
Collaborator

mkitti commented Oct 26, 2023

They mentioned they are on a M2 Mac:

I should note that I am on an M2 Mac

You can use conda or homebrew:

https://anaconda.org/conda-forge/blosc

conda install -c conda-forge blosc

https://formulae.brew.sh/formula/c-blosc

brew install c-blosc

Also see notes from the JBlosx package itself:
https://github.com/Blosc/JBlosc

Depending on the circumstances you may need to set the Java configuration option jna.library.path

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

No branches or pull requests

4 participants