Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,10 @@ else if ( outputPathURIString.toLowerCase().endsWith( ".h5" ) || outPathURI.toSt

final DataType dataType = driverVolumeWriter.getAttribute( "/", "Bigstitcher-Spark/DataType", DataType.class );

final long[] orig_bbMin = driverVolumeWriter.getAttribute( "/", "Bigstitcher-Spark/Boundingbox_min", long[].class );
if ( !Double.isNaN( anisotropyFactor ) )
orig_bbMin[ 2 ] = Math.round( Math.floor( orig_bbMin[ 2 ] * anisotropyFactor ) );

System.out.println( "FusionFormat: " + fusionFormat );
System.out.println( "FusionType: " + fusionType );
System.out.println( "Input XML: " + xmlURI );
Expand Down Expand Up @@ -329,8 +333,8 @@ else if (
{
System.out.println(
"The number of channels and timepoint in XML does not match the number in the export dataset."
+ "You have to specify which ViewIds/Channels/Illuminations/Tiles/Angles/Timepoints should be fused into"
+ "a specific 3D volume in the fusion dataset:");
+ "You have to specify which ViewIds/Channels/Illuminations/Tiles/Angles/Timepoints should be fused into"
+ "a specific 3D volume in the fusion dataset:");

viewIdsGlobal = AbstractSelectableViews.loadViewIds( dataGlobal, vi, angleIds, channelIds, illuminationIds, tileIds, timepointIds );

Expand Down Expand Up @@ -488,6 +492,13 @@ else if ( intensityN5PathURIString.toLowerCase().endsWith( ".h5" ) || intensityN
dataLocal.getViewRegistrations().getViewRegistrations(),
anisotropyFactor,
Double.NaN );

final HashMap< ViewId, AffineTransform3D > orig_registrations =
TransformVirtual.adjustAllTransforms(
viewIds,
dataLocal.getViewRegistrations().getViewRegistrations(),
Double.NaN,
Double.NaN );

final Converter conv;
final Type type;
Expand Down Expand Up @@ -518,7 +529,7 @@ else if ( dataType == DataType.UINT16 )
// The min coordinates of the block that this job renders (in pixels)
final int n = gridBlock[ 0 ].length;
final long[] superBlockOffset = new long[ n ];
Arrays.setAll( superBlockOffset, d -> gridBlock[ 0 ][ d ] + bbMin[ d ] );
Arrays.setAll( superBlockOffset, d -> gridBlock[ 0 ][ d ] + orig_bbMin[ d ] );

// The size of the block that this job renders (in pixels)
final long[] superBlockSize = gridBlock[ 1 ];
Expand All @@ -533,7 +544,7 @@ else if ( dataType == DataType.UINT16 )
Arrays.setAll( fusedBlockMax, d -> superBlockOffset[ d ] + superBlockSize[ d ] - 1 );

final List< ViewId > overlappingViews =
OverlappingViews.findOverlappingViews( dataLocal, viewIds, registrations, fusedBlock );
OverlappingViews.findOverlappingViews( dataLocal, viewIds, orig_registrations, fusedBlock );

if ( overlappingViews.size() == 0 )
return gridBlock;
Expand Down Expand Up @@ -808,4 +819,4 @@ public static void main(final String... args) throws SpimDataException {

System.exit(new CommandLine(new SparkAffineFusion()).execute(args));
}
}
}