saalfeldlab / paintera

GNU General Public License v2.0
94 stars 17 forks source link

Export Label Source as Scalar #495

Open cmhulbert opened 11 months ago

cmhulbert commented 11 months ago

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

SteveNeustadter commented 10 months ago

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 commented 10 months ago

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 commented 8 months ago

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

sudo apt install libblosc1

mkitti commented 8 months ago

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