@@ -128,7 +128,7 @@ public static < T extends RealType< T > & NativeType< T > > BlockSupplier< T > i
128
128
final T type ,
129
129
final int [] blockSize )
130
130
{
131
- return init ( converter , imgloader , viewIds , viewRegistrations , viewDescriptions , fusionType , interpolationMethod ,
131
+ return init ( converter , imgloader , viewIds , viewRegistrations , viewDescriptions , fusionType , null , interpolationMethod ,
132
132
intensityAdjustments , null ,
133
133
fusionInterval , type , blockSize );
134
134
}
@@ -140,13 +140,14 @@ public static < T extends RealType< T > & NativeType< T > > BlockSupplier< T > i
140
140
final Map < ViewId , ? extends AffineTransform3D > viewRegistrations ,
141
141
final Map < ViewId , ? extends BasicViewDescription < ? > > viewDescriptions ,
142
142
final FusionType fusionType ,
143
+ final Map < Integer , Integer > fusionMap , // old setupId > new setupId for fusion order, only makes sense with FusionType.FIRST_LOW or FusionType.FIRST_HIGH
143
144
final int interpolationMethod ,
144
145
final Map < ViewId , Coefficients > intensityAdjustments ,
145
146
final Interval fusionInterval ,
146
147
final T type ,
147
148
final int [] blockSize )
148
149
{
149
- return init ( converter , imgloader , viewIds , viewRegistrations , viewDescriptions , fusionType , interpolationMethod ,
150
+ return init ( converter , imgloader , viewIds , viewRegistrations , viewDescriptions , fusionType , fusionMap , interpolationMethod ,
150
151
null , intensityAdjustments ,
151
152
fusionInterval , type , blockSize );
152
153
}
@@ -158,6 +159,7 @@ private static < T extends RealType< T > & NativeType< T > > BlockSupplier< T >
158
159
final Map < ViewId , ? extends AffineTransform3D > viewRegistrations ,
159
160
final Map < ViewId , ? extends BasicViewDescription < ? > > viewDescriptions ,
160
161
final FusionType fusionType ,
162
+ final Map < Integer , Integer > fusionMap , // old setupId > new setupId for fusion order, only makes sense with FusionType.FIRST_LOW or FusionType.FIRST_HIGH
161
163
final int interpolationMethod ,
162
164
final Map < ViewId , AffineModel1D > intensityAdjustmentModels ,
163
165
final Map < ViewId , Coefficients > intensityAdjustmentCoefficients ,
@@ -188,7 +190,11 @@ private static < T extends RealType< T > & NativeType< T > > BlockSupplier< T >
188
190
189
191
// to be able to use the "lowest ViewId" wins strategy
190
192
final List < ? extends ViewId > sortedViewIds = new ArrayList <>( viewIds );
191
- Collections .sort ( sortedViewIds );
193
+
194
+ if ( fusionMap == null || fusionMap .size () == 0 )
195
+ Collections .sort ( sortedViewIds );
196
+ else
197
+ Collections .sort ( sortedViewIds , (c1 ,c2 ) -> Integer .compare ( fusionMap .get ( c1 .getViewSetupId () ), fusionMap .get ( c2 .getViewSetupId () ) ) );
192
198
193
199
// Which views to process (use un-altered bounding box and registrations).
194
200
// Final filtering happens per Cell.
0 commit comments