From 3629bdf788bffa32bbe88e22b7a76ba59711b64b Mon Sep 17 00:00:00 2001 From: Stephan Preibisch Date: Sat, 14 Sep 2024 09:56:03 -0400 Subject: [PATCH] renamed everything N5 api related to N5Api --- .../datasetmanager/FileListDatasetDefinition.java | 4 ++-- .../fiji/plugin/fusion/DeconvolutionGUI.java | 4 ++-- .../mvrecon/fiji/plugin/fusion/FusionGUI.java | 4 ++-- ...ersResaveN5.java => ParametersResaveN5Api.java} | 14 +++++++------- .../mvrecon/fiji/plugin/resave/Resave_N5Api.java | 12 ++++++------ .../fiji/spimdata/explorer/popup/ResavePopup.java | 6 +++--- .../mvrecon/process/export/DisplayImage.java | 4 ++-- .../mvrecon/process/export/ExportN5API.java | 4 ++-- .../mvrecon/process/n5api/N5ApiTools.java | 2 +- .../mvrecon/process/n5api/SpimData2Tools.java | 2 +- 10 files changed, 28 insertions(+), 28 deletions(-) rename src/main/java/net/preibisch/mvrecon/fiji/plugin/resave/{ParametersResaveN5.java => ParametersResaveN5Api.java} (95%) diff --git a/src/main/java/net/preibisch/mvrecon/fiji/datasetmanager/FileListDatasetDefinition.java b/src/main/java/net/preibisch/mvrecon/fiji/datasetmanager/FileListDatasetDefinition.java index 8f92ab553..ec2f64a76 100644 --- a/src/main/java/net/preibisch/mvrecon/fiji/datasetmanager/FileListDatasetDefinition.java +++ b/src/main/java/net/preibisch/mvrecon/fiji/datasetmanager/FileListDatasetDefinition.java @@ -103,7 +103,7 @@ import net.preibisch.mvrecon.fiji.plugin.Apply_Transformation; import net.preibisch.mvrecon.fiji.plugin.resave.Generic_Resave_HDF5; import net.preibisch.mvrecon.fiji.plugin.resave.Generic_Resave_HDF5.ParametersResaveHDF5; -import net.preibisch.mvrecon.fiji.plugin.resave.ParametersResaveN5; +import net.preibisch.mvrecon.fiji.plugin.resave.ParametersResaveN5Api; import net.preibisch.mvrecon.fiji.plugin.resave.PluginHelper; import net.preibisch.mvrecon.fiji.plugin.resave.ProgressWriterIJ; import net.preibisch.mvrecon.fiji.plugin.resave.Resave_HDF5; @@ -1307,7 +1307,7 @@ else if (resaveAsN5) IOFunctions.println( "N5 path: " + n5DatasetURI ); - final ParametersResaveN5 n5params = ParametersResaveN5.getParamtersIJ( + final ParametersResaveN5Api n5params = ParametersResaveN5Api.getParamtersIJ( xmlURI, n5DatasetURI, viewIds.stream().map( vid -> sd.getViewSetups().get( vid.getViewSetupId() ) ).collect( Collectors.toSet() ), diff --git a/src/main/java/net/preibisch/mvrecon/fiji/plugin/fusion/DeconvolutionGUI.java b/src/main/java/net/preibisch/mvrecon/fiji/plugin/fusion/DeconvolutionGUI.java index 9f2d969db..aae80a803 100644 --- a/src/main/java/net/preibisch/mvrecon/fiji/plugin/fusion/DeconvolutionGUI.java +++ b/src/main/java/net/preibisch/mvrecon/fiji/plugin/fusion/DeconvolutionGUI.java @@ -75,7 +75,7 @@ import net.preibisch.mvrecon.process.deconvolution.iteration.sequential.ComputeBlockSeqThreadCUDAFactory; import net.preibisch.mvrecon.process.downsampling.DownsampleTools; import net.preibisch.mvrecon.process.export.DisplayImage; -import net.preibisch.mvrecon.process.export.ExportN5API; +import net.preibisch.mvrecon.process.export.ExportN5Api; import net.preibisch.mvrecon.process.export.ImgExport; import net.preibisch.mvrecon.process.export.Save3dTIFF; import net.preibisch.mvrecon.process.fusion.FusionTools; @@ -95,7 +95,7 @@ public class DeconvolutionGUI implements FusionExportInterface staticImgExportAlgorithms.add( new DisplayImage() ); staticImgExportAlgorithms.add( new Save3dTIFF( null ) ); - staticImgExportAlgorithms.add( new ExportN5API() ); + staticImgExportAlgorithms.add( new ExportN5Api() ); imgExportDescriptions = new String[ staticImgExportAlgorithms.size() ]; diff --git a/src/main/java/net/preibisch/mvrecon/fiji/plugin/fusion/FusionGUI.java b/src/main/java/net/preibisch/mvrecon/fiji/plugin/fusion/FusionGUI.java index 1f015ca8f..68559030d 100644 --- a/src/main/java/net/preibisch/mvrecon/fiji/plugin/fusion/FusionGUI.java +++ b/src/main/java/net/preibisch/mvrecon/fiji/plugin/fusion/FusionGUI.java @@ -59,7 +59,7 @@ import net.preibisch.mvrecon.process.downsampling.DownsampleTools; import net.preibisch.mvrecon.process.export.DisplayImage; import net.preibisch.mvrecon.process.export.ExportLarge2DTIFF; -import net.preibisch.mvrecon.process.export.ExportN5API; +import net.preibisch.mvrecon.process.export.ExportN5Api; import net.preibisch.mvrecon.process.export.ImgExport; import net.preibisch.mvrecon.process.export.OpenSeaDragon; import net.preibisch.mvrecon.process.export.Save3dTIFF; @@ -128,7 +128,7 @@ public enum FusionType { AVG, AVG_BLEND, AVG_CONTENT, AVG_BLEND_CONTENT, MAX, FI staticImgExportAlgorithms.add( new DisplayImage() ); staticImgExportAlgorithms.add( new Save3dTIFF( null ) ); - staticImgExportAlgorithms.add( new ExportN5API() ); + staticImgExportAlgorithms.add( new ExportN5Api() ); staticImgExportAlgorithms.add( new OpenSeaDragon() ); staticImgExportAlgorithms.add( new ExportLarge2DTIFF() ); diff --git a/src/main/java/net/preibisch/mvrecon/fiji/plugin/resave/ParametersResaveN5.java b/src/main/java/net/preibisch/mvrecon/fiji/plugin/resave/ParametersResaveN5Api.java similarity index 95% rename from src/main/java/net/preibisch/mvrecon/fiji/plugin/resave/ParametersResaveN5.java rename to src/main/java/net/preibisch/mvrecon/fiji/plugin/resave/ParametersResaveN5Api.java index 3b37d142b..69c6ca103 100644 --- a/src/main/java/net/preibisch/mvrecon/fiji/plugin/resave/ParametersResaveN5.java +++ b/src/main/java/net/preibisch/mvrecon/fiji/plugin/resave/ParametersResaveN5Api.java @@ -46,7 +46,7 @@ import net.preibisch.legacy.io.IOFunctions; import net.preibisch.mvrecon.fiji.plugin.util.GUIHelper; -public class ParametersResaveN5 +public class ParametersResaveN5Api { public static String[] compressions = new String[]{ "Bzip2", "Gzip", "Lz4", "Raw (no compression)", "Xz" }; public static int defaultBlockSize = 64; @@ -69,13 +69,13 @@ public static URI createN5URIfromXMLURI( final URI xmlURI ) return URI.create( xmlURI.toString().subSequence( 0, xmlURI.toString().length() - 4 ) + ".n5" ); } - public static ParametersResaveN5 getParamtersIJ( + public static ParametersResaveN5Api getParamtersIJ( final Collection< ViewSetup > setupsToProcess ) { return getParamtersIJ( null, null, setupsToProcess, false ); } - public static ParametersResaveN5 getParamtersIJ( + public static ParametersResaveN5Api getParamtersIJ( final URI xmlURI, final Collection< ViewSetup > setupsToProcess, final boolean askForPaths ) @@ -85,13 +85,13 @@ public static ParametersResaveN5 getParamtersIJ( return getParamtersIJ( xmlURI, n5URI, setupsToProcess, askForPaths ); } - public static ParametersResaveN5 getParamtersIJ( + public static ParametersResaveN5Api getParamtersIJ( final URI xmlURI, final URI n5URI, final Collection< ViewSetup > setupsToProcess, final boolean askForPaths ) { - final ParametersResaveN5 n5params = new ParametersResaveN5(); + final ParametersResaveN5Api n5params = new ParametersResaveN5Api(); final Map< Integer, ExportMipmapInfo > perSetupExportMipmapInfo = Resave_HDF5.proposeMipmaps( setupsToProcess ); //xml.getViewSetupsToProcess() ); final int firstviewSetupId = setupsToProcess.iterator().next().getId();// xml.getData().getSequenceDescription().getViewSetupsOrdered().get( 0 ).getId(); @@ -101,9 +101,9 @@ public static ParametersResaveN5 getParamtersIJ( for ( final int[] row : autoMipmapSettings.getSubdivisions() ) { Arrays.fill( row, defaultBlockSize ); - row[ 0 ] = ParametersResaveN5.defaultBlockSizeXY; + row[ 0 ] = ParametersResaveN5Api.defaultBlockSizeXY; if ( row.length >= 2 ) - row[ 1 ] = ParametersResaveN5.defaultBlockSizeXY; + row[ 1 ] = ParametersResaveN5Api.defaultBlockSizeXY; } final long[] maxDimensions = setupsToProcess.iterator().next().getSize().dimensionsAsLongArray(); diff --git a/src/main/java/net/preibisch/mvrecon/fiji/plugin/resave/Resave_N5Api.java b/src/main/java/net/preibisch/mvrecon/fiji/plugin/resave/Resave_N5Api.java index 68757afd5..449133b5c 100644 --- a/src/main/java/net/preibisch/mvrecon/fiji/plugin/resave/Resave_N5Api.java +++ b/src/main/java/net/preibisch/mvrecon/fiji/plugin/resave/Resave_N5Api.java @@ -53,7 +53,7 @@ import net.preibisch.mvrecon.fiji.plugin.queryXML.LoadParseQueryXML; import net.preibisch.mvrecon.fiji.spimdata.SpimData2; import net.preibisch.mvrecon.fiji.spimdata.XmlIoSpimData2; -import net.preibisch.mvrecon.process.export.ExportN5API.StorageType; +import net.preibisch.mvrecon.process.export.ExportN5Api.StorageType; import net.preibisch.mvrecon.process.n5api.N5ApiTools; import net.preibisch.mvrecon.process.n5api.N5ApiTools.MultiResolutionLevelInfo; import net.preibisch.mvrecon.process.n5api.SpimData2Tools; @@ -70,7 +70,7 @@ public void run(String arg) if ( !xml.queryXML( "Resaving as N5", "Resave", true, true, true, true, true ) ) return; - final ParametersResaveN5 n5params = ParametersResaveN5.getParamtersIJ( xml.getXMLURI(), xml.getViewSetupsToProcess(), true ); + final ParametersResaveN5Api n5params = ParametersResaveN5Api.getParamtersIJ( xml.getXMLURI(), xml.getViewSetupsToProcess(), true ); if ( n5params == null ) return; @@ -87,7 +87,7 @@ public void run(String arg) public static SpimData2 resaveN5( final SpimData2 data, final Collection vidsToResave, - final ParametersResaveN5 n5Params, + final ParametersResaveN5Api n5Params, final boolean saveXML ) { final SpimData2 sdReduced = SpimData2Tools.reduceSpimData2( data, vidsToResave.stream().collect( Collectors.toList() ) ); @@ -106,10 +106,10 @@ public static SpimData2 resaveN5( ExportMipmapInfo exportMipmapInfo = n5Params.proposedMipmaps.get( k ); for (int[] row : exportMipmapInfo.getSubdivisions()) { - Arrays.fill( row, ParametersResaveN5.defaultBlockSize ); - row[ 0 ] = ParametersResaveN5.defaultBlockSizeXY; + Arrays.fill( row, ParametersResaveN5Api.defaultBlockSize ); + row[ 0 ] = ParametersResaveN5Api.defaultBlockSizeXY; if ( row.length >= 2 ) - row[ 1 ] = ParametersResaveN5.defaultBlockSizeXY; + row[ 1 ] = ParametersResaveN5Api.defaultBlockSizeXY; } }); } diff --git a/src/main/java/net/preibisch/mvrecon/fiji/spimdata/explorer/popup/ResavePopup.java b/src/main/java/net/preibisch/mvrecon/fiji/spimdata/explorer/popup/ResavePopup.java index 03930aec7..8d44f944c 100644 --- a/src/main/java/net/preibisch/mvrecon/fiji/spimdata/explorer/popup/ResavePopup.java +++ b/src/main/java/net/preibisch/mvrecon/fiji/spimdata/explorer/popup/ResavePopup.java @@ -42,7 +42,7 @@ import mpicbg.spim.data.sequence.ViewSetup; import net.preibisch.legacy.io.IOFunctions; import net.preibisch.mvrecon.fiji.plugin.resave.Generic_Resave_HDF5; -import net.preibisch.mvrecon.fiji.plugin.resave.ParametersResaveN5; +import net.preibisch.mvrecon.fiji.plugin.resave.ParametersResaveN5Api; import net.preibisch.mvrecon.fiji.plugin.resave.ProgressWriterIJ; import net.preibisch.mvrecon.fiji.plugin.resave.Resave_HDF5; import net.preibisch.mvrecon.fiji.plugin.resave.Resave_N5Api; @@ -286,9 +286,9 @@ else if (index == 4 || index == 5) // 4 == in-place, 5 == choose path { panel.saveXML(); - final URI n5DatasetURI = ParametersResaveN5.createN5URIfromXMLURI( panel.xml() ); + final URI n5DatasetURI = ParametersResaveN5Api.createN5URIfromXMLURI( panel.xml() ); - final ParametersResaveN5 n5params = ParametersResaveN5.getParamtersIJ( + final ParametersResaveN5Api n5params = ParametersResaveN5Api.getParamtersIJ( panel.xml(), n5DatasetURI, viewIds.stream().map( vid -> data.getSequenceDescription().getViewSetups().get( vid.getViewSetupId() ) ).collect( Collectors.toSet() ), diff --git a/src/main/java/net/preibisch/mvrecon/process/export/DisplayImage.java b/src/main/java/net/preibisch/mvrecon/process/export/DisplayImage.java index 497bf1e95..109ea9932 100644 --- a/src/main/java/net/preibisch/mvrecon/process/export/DisplayImage.java +++ b/src/main/java/net/preibisch/mvrecon/process/export/DisplayImage.java @@ -197,7 +197,7 @@ public boolean queryParameters( final FusionExportInterface fusion ) gd.addNumericField( "min_intensity", defaultMinIntensity, 0); gd.addNumericField( "max_intensity", defaultMaxIntensity, 0); - gd.addCheckbox( "Show_advanced_block_size_options (in a new dialog, can optimize processing time)", ExportN5API.defaultAdvancedBlockSize ); + gd.addCheckbox( "Show_advanced_block_size_options (in a new dialog, can optimize processing time)", ExportN5Api.defaultAdvancedBlockSize ); if ( is2d ) gd.addMessage( "Note: we have a 2d-dataset, choose 1 in z.", GUIHelper.smallStatusFont, GUIHelper.neutral ); @@ -214,7 +214,7 @@ public boolean queryParameters( final FusionExportInterface fusion ) minIntensity = defaultMinIntensity = (int)Math.round( gd.getNextNumber() ); maxIntensity = defaultMaxIntensity = (int)Math.round( gd.getNextNumber() ); - if ( ExportN5API.defaultAdvancedBlockSize = gd.getNextBoolean() ) + if ( ExportN5Api.defaultAdvancedBlockSize = gd.getNextBoolean() ) { final GenericDialog gd2 = new GenericDialog( "Compute block size options" ); diff --git a/src/main/java/net/preibisch/mvrecon/process/export/ExportN5API.java b/src/main/java/net/preibisch/mvrecon/process/export/ExportN5API.java index 760f511ac..67d6546e8 100644 --- a/src/main/java/net/preibisch/mvrecon/process/export/ExportN5API.java +++ b/src/main/java/net/preibisch/mvrecon/process/export/ExportN5API.java @@ -81,7 +81,7 @@ import util.Grid; import util.URITools; -public class ExportN5API implements ImgExport +public class ExportN5Api implements ImgExport { public enum StorageType { N5, ZARR, HDF5 } @@ -156,7 +156,7 @@ public boolean finish() public int[] computeBlocksizeFactor() { return new int[] { bsFactorX, bsFactorY, bsFactorZ }; } @Override - public ImgExport newInstance() { return new ExportN5API(); } + public ImgExport newInstance() { return new ExportN5Api(); } @Override public String getDescription() { return "ZARR/N5/HDF5 export using N5-API"; } diff --git a/src/main/java/net/preibisch/mvrecon/process/n5api/N5ApiTools.java b/src/main/java/net/preibisch/mvrecon/process/n5api/N5ApiTools.java index 66c66f476..d4cd02b74 100644 --- a/src/main/java/net/preibisch/mvrecon/process/n5api/N5ApiTools.java +++ b/src/main/java/net/preibisch/mvrecon/process/n5api/N5ApiTools.java @@ -40,7 +40,7 @@ import net.preibisch.legacy.io.IOFunctions; import net.preibisch.mvrecon.fiji.spimdata.SpimData2; import net.preibisch.mvrecon.process.downsampling.lazy.LazyHalfPixelDownsample2x; -import net.preibisch.mvrecon.process.export.ExportN5API.StorageType; +import net.preibisch.mvrecon.process.export.ExportN5Api.StorageType; import net.preibisch.mvrecon.process.interestpointregistration.pairwise.constellation.grouping.Group; import util.Grid; diff --git a/src/main/java/net/preibisch/mvrecon/process/n5api/SpimData2Tools.java b/src/main/java/net/preibisch/mvrecon/process/n5api/SpimData2Tools.java index 1ae233b65..c226a8dd6 100644 --- a/src/main/java/net/preibisch/mvrecon/process/n5api/SpimData2Tools.java +++ b/src/main/java/net/preibisch/mvrecon/process/n5api/SpimData2Tools.java @@ -56,7 +56,7 @@ import net.preibisch.mvrecon.fiji.spimdata.interestpoints.ViewInterestPoints; import net.preibisch.mvrecon.fiji.spimdata.pointspreadfunctions.PointSpreadFunctions; import net.preibisch.mvrecon.fiji.spimdata.stitchingresults.StitchingResults; -import net.preibisch.mvrecon.process.export.ExportN5API.StorageType; +import net.preibisch.mvrecon.process.export.ExportN5Api.StorageType; import net.preibisch.mvrecon.process.interestpointregistration.pairwise.constellation.grouping.Group; import net.preibisch.mvrecon.process.n5api.N5ApiTools.MultiResolutionLevelInfo; import util.URITools;