-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from mastodon-sc/fix-fit-ellipsoid-test
Fix fit ellipsoid test
- Loading branch information
Showing
4 changed files
with
89 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
src/main/java/org/mastodon/mamut/fitting/MinimalProjectModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package org.mastodon.mamut.fitting; | ||
|
||
import org.mastodon.mamut.ProjectModel; | ||
import org.mastodon.mamut.model.Link; | ||
import org.mastodon.mamut.model.Model; | ||
import org.mastodon.mamut.model.Spot; | ||
import org.mastodon.model.SelectionModel; | ||
import org.mastodon.views.bdv.SharedBigDataViewerData; | ||
|
||
/** | ||
* A minimal interface to the data model of a Mastodon project.<p> | ||
* This interface facilities testing of the ellipsoid fitting, since it allows to circumvent the fact that the {@link org.mastodon.mamut.ProjectModel} creates GUI components on instantiation.<p> | ||
* It contains accessor methods to parts of the {@link org.mastodon.mamut.ProjectModel} that are safe to be used in a headless way. | ||
* | ||
* @author Stefan Hahmann | ||
*/ | ||
public class MinimalProjectModel | ||
{ | ||
private final Model model; | ||
|
||
private final SharedBigDataViewerData sharedBdvData; | ||
|
||
private final SelectionModel< Spot, Link > selectionModel; | ||
|
||
MinimalProjectModel( | ||
final Model model, final SharedBigDataViewerData sharedBdvData, final SelectionModel< Spot, Link > selectionModel | ||
) | ||
{ | ||
this.model = model; | ||
this.sharedBdvData = sharedBdvData; | ||
this.selectionModel = selectionModel; | ||
} | ||
|
||
public MinimalProjectModel( final ProjectModel projectModel ) | ||
{ | ||
this( projectModel.getModel(), projectModel.getSharedBdvData(), projectModel.getSelectionModel() ); | ||
} | ||
|
||
public Model getModel() | ||
{ | ||
return model; | ||
} | ||
|
||
public SharedBigDataViewerData getSharedBdvData() | ||
{ | ||
return sharedBdvData; | ||
} | ||
|
||
public SelectionModel< Spot, Link > getSelectionModel() | ||
{ | ||
return selectionModel; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters