Skip to content

Commit

Permalink
reset correspondences, clone arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanPreibisch committed May 10, 2024
1 parent 602a268 commit 50b7e73
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Random;

import bdv.ViewerImgLoader;
import mpicbg.spim.data.registration.ViewRegistration;
Expand Down Expand Up @@ -179,20 +180,18 @@ public static SpimData2 splitImages( final SpimData2 spimData, final long[] over
{
if ( contains( ip.getL(), interval ) )
{
final double[] l = ip.getL();
final double[] l = ip.getL().clone();
for ( int d = 0; d < interval.numDimensions(); ++d )
l[ d ] -= interval.min( d );
l[ d ] -= interval.min( d );// + (rnd.nextDouble() - 0.5);

newIp.add( new InterestPoint( id++, l ) );
}
}

final InterestPoints newIpl = InterestPoints.newInstance( oldIpl.getBaseDir(), newViewId, label);
/*final InterestPointList newIpl = new InterestPointList( oldIpl.getBaseDir(), new File(
"interestpoints", "new_tpId_" + newViewId.getTimePointId() +
"_viewSetupId_" + newViewId.getViewSetupId() + "." + label ) );*/
newIpl.setInterestPoints( newIp );
newIpl.setParameters( oldIpl.getParameters() );
newIpl.setCorrespondingInterestPoints( new ArrayList<>() );
newVipl.addInterestPointList( label, newIpl ); // still add
}
}
Expand Down

0 comments on commit 50b7e73

Please sign in to comment.