Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bookmark-to-bookmark movie dialog #47

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/main/java/bdv/BigDataViewer.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
import bdv.tools.InitializeViewerState;
import bdv.tools.RecordMaxProjectionDialog;
import bdv.tools.RecordMovieDialog;
import bdv.tools.RecordPathMovieDialog;
import bdv.tools.VisibilityAndGroupingDialog;
import bdv.tools.bookmarks.Bookmarks;
import bdv.tools.bookmarks.BookmarksEditor;
Expand Down Expand Up @@ -110,6 +111,8 @@ public class BigDataViewer

protected final RecordMovieDialog movieDialog;

protected final RecordPathMovieDialog pathMovieDialog;

protected final RecordMaxProjectionDialog movieMaxProjectDialog;

protected final VisibilityAndGroupingDialog activeSourcesDialog;
Expand Down Expand Up @@ -369,6 +372,10 @@ public BigDataViewer(
// this is just to get updates of window size:
viewer.getDisplay().addOverlayRenderer( movieDialog );

pathMovieDialog = new RecordPathMovieDialog( viewerFrame, viewer, bookmarks, progressWriter );
// this is just to get updates of window size:
viewer.getDisplay().addOverlayRenderer( pathMovieDialog );

movieMaxProjectDialog = new RecordMaxProjectionDialog( viewerFrame, viewer, progressWriter );
// this is just to get updates of window size:
viewer.getDisplay().addOverlayRenderer( movieMaxProjectDialog );
Expand Down Expand Up @@ -446,6 +453,10 @@ public boolean accept( final File f )
miMovie.setText( "Record Movie" );
menu.add( miMovie );

final JMenuItem miPathMovie = new JMenuItem( actionMap.get( BigDataViewerActions.RECORD_PATH_MOVIE ) );
miPathMovie.setText( "Record Path Movie" );
menu.add( miPathMovie );

final JMenuItem miMaxProjectMovie = new JMenuItem( actionMap.get( BigDataViewerActions.RECORD_MAX_PROJECTION_MOVIE ) );
miMaxProjectMovie.setText( "Record Max-Projection Movie" );
menu.add( miMaxProjectMovie );
Expand Down Expand Up @@ -532,6 +543,11 @@ public ManualTransformationEditor getManualTransformEditor()
return manualTransformationEditor;
}

public Bookmarks getBookmarks()
{
return bookmarks;
}

public boolean tryLoadSettings( final String xmlFilename )
{
proposedSettingsFile = null;
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/bdv/BigDataViewerActions.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import bdv.tools.HelpDialog;
import bdv.tools.RecordMaxProjectionDialog;
import bdv.tools.RecordMovieDialog;
import bdv.tools.RecordPathMovieDialog;
import bdv.tools.ToggleDialogAction;
import bdv.tools.VisibilityAndGroupingDialog;
import bdv.tools.bookmarks.BookmarksEditor;
Expand All @@ -58,6 +59,7 @@ public class BigDataViewerActions extends Actions
public static final String SAVE_SETTINGS = "save settings";
public static final String LOAD_SETTINGS = "load settings";
public static final String RECORD_MOVIE = "record movie";
public static final String RECORD_PATH_MOVIE = "record path movie";
public static final String RECORD_MAX_PROJECTION_MOVIE = "record max projection movie";
public static final String SET_BOOKMARK = "set bookmark";
public static final String GO_TO_BOOKMARK = "go to bookmark";
Expand All @@ -70,6 +72,7 @@ public class BigDataViewerActions extends Actions
static final String[] RECORD_MAX_PROJECTION_MOVIE_KEYS = new String[] { "F8" };
static final String[] CROP_KEYS = new String[] { "F9" };
static final String[] RECORD_MOVIE_KEYS = new String[] { "F10" };
static final String[] RECORD_PATH_MOVIE_KEYS = new String[] { "shift F10" };
static final String[] SAVE_SETTINGS_KEYS = new String[] { "F11" };
static final String[] LOAD_SETTINGS_KEYS = new String[] { "F12" };
static final String[] GO_TO_BOOKMARK_KEYS = new String[] { "B" };
Expand Down Expand Up @@ -99,6 +102,7 @@ public static void installActionBindings(
actions.dialog( bdv.helpDialog );
actions.dialog( bdv.cropDialog );
actions.dialog( bdv.movieDialog );
actions.dialog( bdv.pathMovieDialog );
actions.dialog( bdv.movieMaxProjectDialog );
actions.bookmarks( bdv.bookmarkEditor );
actions.manualTransform( bdv.manualTransformationEditor );
Expand Down Expand Up @@ -144,6 +148,11 @@ public void dialog( final RecordMovieDialog recordMovieDialog )
toggleDialogAction( recordMovieDialog, RECORD_MOVIE, RECORD_MOVIE_KEYS );
}

public void dialog( final RecordPathMovieDialog recordMovieDialog )
{
toggleDialogAction( recordMovieDialog, RECORD_PATH_MOVIE, RECORD_PATH_MOVIE_KEYS );
}

public void dialog( final RecordMaxProjectionDialog recordMaxProjectionDialog )
{
toggleDialogAction( recordMaxProjectionDialog, RECORD_MAX_PROJECTION_MOVIE, RECORD_MAX_PROJECTION_MOVIE_KEYS );
Expand Down
Loading