Skip to content

Commit e1f2d26

Browse files
committed
changes based on multiview reconstruction scale fixes
1 parent fa4e542 commit e1f2d26

4 files changed

Lines changed: 7 additions & 16 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
<bigdataviewer-n5.version>1.0.2</bigdataviewer-n5.version>
104104

105105
<spim_data.version>2.3.5</spim_data.version>
106-
<multiview-reconstruction.version>8.0.0</multiview-reconstruction.version>
106+
<multiview-reconstruction.version>8.0.1-SNAPSHOT</multiview-reconstruction.version>
107107
<BigStitcher.version>2.5.0</BigStitcher.version>
108108

109109
<n5-universe.version>2.3.0</n5-universe.version>

src/main/java/net/preibisch/bigstitcher/spark/CreateFusionContainer.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public class CreateFusionContainer extends AbstractBasic implements Callable<Voi
5959
{
6060
private static final long serialVersionUID = -9140450542904228386L;
6161

62-
public static enum Compressions { Lz4, Gzip, Zstandard, Blosc, Bzip2, Xz, Raw };
62+
public enum Compressions { Lz4, Gzip, Zstandard, Blosc, Bzip2, Xz, Raw };
6363

6464
@Option(names = { "-o", "--outputPath" }, required = true, description = "OME-ZARR/N5/HDF5 path for saving, e.g. -o /home/fused.zarr, file:/home/fused.n5 or e.g. s3://myBucket/data.zarr")
6565
private String outputPathURIString = null;
@@ -365,8 +365,8 @@ else if ( storageType == StorageFormat.N5 || storageType == StorageFormat.ZARR )
365365
// extract the resolution of the s0 export
366366
// TODO: this is inaccurate, we should actually estimate it from the final transformn that is applied
367367
// TODO: this is a hack (returns 1,1,1) so the export downsampling pyramid is working
368-
final VoxelDimensions vx = new FinalVoxelDimensions( "micrometer", new double[] { 1, 1, 1 } );// dataGlobal.getSequenceDescription().getViewSetupsOrdered().iterator().next().getVoxelSize();
369-
final double[] resolutionS0 = OMEZarrAttibutes.getResolutionS0( vx, anisotropyFactor, Double.NaN );
368+
final VoxelDimensions vx = dataGlobal.getSequenceDescription().getViewSetupsOrdered().iterator().next().getVoxelSize();
369+
final double[] resolutionS0 = OMEZarrAttibutes.getResolutionS0( vx );
370370

371371
System.out.println( "Resolution of level 0: " + Util.printCoordinates( resolutionS0 ) + " " + "micrometer" ); //vx.unit() might not be OME-ZARR compatiblevx.unit() );
372372

@@ -410,10 +410,8 @@ else if ( storageType == StorageFormat.ZARR )
410410
tps.add( new TimePoint( t ) );
411411

412412
// extract the resolution of the s0 export
413-
// TODO: this is inaccurate, we should actually estimate it from the final transformn that is applied
414-
// TODO: this is a hack (returns 1,1,1) so the export downsampling pyramid is working
415-
final VoxelDimensions vx = new FinalVoxelDimensions( "micrometer", new double[] { 1, 1, 1 } );// dataGlobal.getSequenceDescription().getViewSetupsOrdered().iterator().next().getVoxelSize();
416-
final double[] resolutionS0 = OMEZarrAttibutes.getResolutionS0( vx, anisotropyFactor, Double.NaN );
413+
final VoxelDimensions vx = dataGlobal.getSequenceDescription().getViewSetupsOrdered().iterator().next().getVoxelSize();
414+
final double[] resolutionS0 = OMEZarrAttibutes.getResolutionS0( vx );
417415

418416
System.out.println( "Resolution of level 0: " + Util.printCoordinates( resolutionS0 ) + " " + "m" ); //vx.unit() might not be OME-ZARR compatiblevx.unit() );
419417

src/main/java/net/preibisch/bigstitcher/spark/SparkAffineFusion.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import java.util.concurrent.Callable;
3434
import java.util.concurrent.ExecutorService;
3535
import java.util.concurrent.Executors;
36-
import java.util.stream.Collectors;
3736

3837
import org.apache.spark.SparkConf;
3938
import org.apache.spark.api.java.JavaRDD;
@@ -153,7 +152,6 @@ public enum DataTypeFusion
153152
@Option(names = { "--prefetch" }, description = "prefetch all blocks required for fusion in each Spark job using unlimited threads, useful in cloud environments (default: false)")
154153
protected boolean prefetch = false;
155154

156-
157155
// TODO: add support for loading coefficients during fusion
158156
@CommandLine.Option(names = { "--intensityN5Path" }, description = "N5/ZARR/HDF5 base path for loading coefficients (e.g. s3://myBucket/coefficients.n5)")
159157
private String intensityN5PathURIString = null;
@@ -540,11 +538,7 @@ else if ( dataType == DataType.UINT16 )
540538
return gridBlock;
541539

542540
// load intensity correction coefficients for all overlapping views
543-
544-
545541
final Map< ViewId, Coefficients > coefficients;
546-
547-
548542
if ( intensityN5PathURI != null )
549543
{
550544
coefficients = new HashMap<>();
@@ -598,7 +592,6 @@ else if ( dataType == DataType.UINT16 )
598592
System.out.println( "Fusing block: offset=" + Util.printCoordinates( gridBlock[0] ) + ", dimension=" + Util.printCoordinates( gridBlock[1] ) );
599593

600594
// returns a zero-min interval
601-
//blockSupplier = BlkAffineFusion.init(
602595
blockSupplier = BlkAffineFusion.initWithIntensityCoefficients(
603596
conv,
604597
dataLocal.getSequenceDescription().getImgLoader(),

src/main/java/net/preibisch/bigstitcher/spark/SparkResaveN5.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ public Void call() throws Exception
248248
viewId,
249249
dataTypes.get( viewId.getViewSetupId() ),
250250
dimensions.get( viewId.getViewSetupId() ),
251-
//dataGlobal.getSequenceDescription().getViewDescription( viewId ).getViewSetup().getVoxelSize().dimensionsAsDoubleArray(), // TODO: this is a hack for now
251+
dataGlobal.getSequenceDescription().getViewDescription( viewId ).getViewSetup().getVoxelSize().dimensionsAsDoubleArray(),
252252
compression,
253253
blockSize,
254254
downsamplings);

0 commit comments

Comments
 (0)