Skip to content

Commit

Permalink
Set z-coordinate of spots in case of 2D image to 0
Browse files Browse the repository at this point in the history
When the z-coordinate of spots is set to 1, the image became invisible in the BDV, after the user selected a track/spot, since the z-coordinate of the BDV changed to 1, while the image was assumed to be at z=0 by the BDV.
  • Loading branch information
stefanhahmann committed Dec 13, 2024
1 parent b1a3695 commit 4b80969
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ private static int createSpotsFromFrameLabels( final ModelGraph graph, final int
cov[ i ][ i ] += SINGLE_PIXEL_COVARIANCE;
if ( mean.length == 2 ) // NB: 2D case, add a third dimension with 0 covariance
{
mean = new double[] { mean[ 0 ], mean[ 1 ], 1 };
mean = new double[] { mean[ 0 ], mean[ 1 ], 0 };
cov = new double[][] {
{ cov[ 0 ][ 0 ], cov[ 0 ][ 1 ], 0 },
{ cov[ 1 ][ 0 ], cov[ 1 ][ 1 ], 0 },
Expand Down

0 comments on commit 4b80969

Please sign in to comment.