@@ -549,8 +549,6 @@ private <T extends NativeType<T>> RandomAccessibleInterval<T> prepareCachedImage
549
549
}
550
550
long [] dimensions = getDimensions (attributes );
551
551
final int [] cellDimensions = getBlockSize (attributes );
552
- System .out .println ("dim" + Arrays .toString (dimensions ));
553
- System .out .println ("cell" + Arrays .toString (cellDimensions ));
554
552
final CellGrid grid = new CellGrid (dimensions , cellDimensions );
555
553
556
554
final int priority = numMipmapLevels () - 1 - level ;
@@ -618,8 +616,8 @@ public A createArray(DataBlock<?> dataBlock, long[] gridPosition) {
618
616
long [] cellDims = getCellDims (gridPosition );
619
617
int n = (int ) (cellDims [0 ] * cellDims [1 ] * cellDims [2 ]);
620
618
621
- if ( is2D )
622
- cellDims = Arrays .stream ( cellDims ).limit ( 2 ).toArray ();
619
+ if (is2D )
620
+ cellDims = Arrays .stream (cellDims ).limit (2 ).toArray ();
623
621
624
622
switch (dataType ) {
625
623
case UINT8 :
@@ -732,7 +730,7 @@ private static class N5OMEZarrCacheArrayLoader<A> implements SimpleCacheArrayLoa
732
730
public A loadArray (final long [] gridPosition ) throws IOException {
733
731
DataBlock <?> block = null ;
734
732
735
- long [] dataBlockIndices = toDataBlockIndices ( gridPosition );
733
+ long [] dataBlockIndices = toDataBlockIndices (gridPosition );
736
734
737
735
long start = 0 ;
738
736
if (logChunkLoading ) {
@@ -755,48 +753,47 @@ public A loadArray(final long[] gridPosition) throws IOException {
755
753
}
756
754
757
755
if (block == null ) {
758
- return arrayCreator .createEmptyArray ( gridPosition );
756
+ return arrayCreator .createEmptyArray (gridPosition );
759
757
} else {
760
758
return arrayCreator .createArray (block , gridPosition );
761
759
}
762
760
}
763
761
764
- private long [] toDataBlockIndices ( long [] gridPosition )
765
- {
762
+ private long [] toDataBlockIndices (long [] gridPosition ) {
766
763
long [] dataBlockIndices = gridPosition ;
767
764
768
765
if (is2D ) {
769
766
dataBlockIndices = new long [2 ];
770
- System .arraycopy ( gridPosition , 0 , dataBlockIndices , 0 , 2 );
767
+ System .arraycopy (gridPosition , 0 , dataBlockIndices , 0 , 2 );
771
768
}
772
769
773
770
if (is4DC && is4DT ) {
774
771
dataBlockIndices = new long [4 ];
775
- System .arraycopy ( gridPosition , 0 , dataBlockIndices , 0 , 2 );
772
+ System .arraycopy (gridPosition , 0 , dataBlockIndices , 0 , 2 );
776
773
dataBlockIndices [2 ] = channel ;
777
774
dataBlockIndices [3 ] = timepoint ;
778
775
}
779
776
780
777
if (is5D ) {
781
778
dataBlockIndices = new long [5 ];
782
- System .arraycopy ( gridPosition , 0 , dataBlockIndices , 0 , 3 );
779
+ System .arraycopy (gridPosition , 0 , dataBlockIndices , 0 , 3 );
783
780
dataBlockIndices [3 ] = channel ;
784
781
dataBlockIndices [4 ] = timepoint ;
785
782
}
786
783
787
784
if (is4DC && !is4DT ) {
788
785
dataBlockIndices = new long [4 ];
789
- System .arraycopy ( gridPosition , 0 , dataBlockIndices , 0 , 3 );
786
+ System .arraycopy (gridPosition , 0 , dataBlockIndices , 0 , 3 );
790
787
dataBlockIndices [3 ] = channel ;
791
788
}
792
789
793
790
if (is4DT && !is4DC ) {
794
791
dataBlockIndices = new long [4 ];
795
- System .arraycopy ( gridPosition , 0 , dataBlockIndices , 0 , 3 );
792
+ System .arraycopy (gridPosition , 0 , dataBlockIndices , 0 , 3 );
796
793
dataBlockIndices [3 ] = timepoint ;
797
794
}
798
795
799
- if ( dataBlockIndices == null )
796
+ if (dataBlockIndices == null )
800
797
throw new RuntimeException ("Could not determine the data block to be loaded." );
801
798
802
799
return dataBlockIndices ;
0 commit comments