Skip to content

Commit

Permalink
renamed everything N5 api related to N5Api
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanPreibisch committed Sep 14, 2024
1 parent 3cc1fd2 commit 3629bdf
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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() ),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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() ];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 )
Expand All @@ -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();
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -87,7 +87,7 @@ public void run(String arg)
public static SpimData2 resaveN5(
final SpimData2 data,
final Collection<? extends ViewId> vidsToResave,
final ParametersResaveN5 n5Params,
final ParametersResaveN5Api n5Params,
final boolean saveXML )
{
final SpimData2 sdReduced = SpimData2Tools.reduceSpimData2( data, vidsToResave.stream().collect( Collectors.toList() ) );
Expand All @@ -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;
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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() ),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand All @@ -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" );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand Down Expand Up @@ -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"; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3629bdf

Please sign in to comment.