Skip to content

Commit

Permalink
Sets the units of a model from the settings when creating an empty Tr…
Browse files Browse the repository at this point in the history
…ackMate.
  • Loading branch information
tinevez committed Dec 12, 2024
1 parent 89d3b7a commit 11147cd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/fiji/plugin/trackmate/TrackMate.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ public class TrackMate implements Benchmark, MultiThreaded, Algorithm, Named, Ca
public TrackMate( final Settings settings )
{
this( new Model(), settings );
if ( settings.imp != null && settings.imp.getCalibration() != null )
{
final String spaceUnits = settings.imp.getCalibration().getXUnit();
final String timeUnits = settings.imp.getCalibration().getTimeUnit();
model.setPhysicalUnits( spaceUnits, timeUnits );
}
}

public TrackMate( final Model model, final Settings settings )
Expand Down

0 comments on commit 11147cd

Please sign in to comment.