File menu options
Introduction
This page describes the functional specifications for "File" menu items. The File menu contains following menu options:
- File > Open
- File > Open > Cart
- File > Open > Workspace
- File > Open > Workspace Snapshot
- File > Save
- File > Save > Cart
- File > Save > Workspace
- File > Save > Workspace Snapshot
- File > Save > Export to image
The options for
Following diagram shows the locations of these options.
Menu Options
File
Default behavior for
File menu is as follows:
- In "Welcome workspace": Only File > Open > Cart option should be enabled, all other options should be grayed out.
- In "Search workspace", "Registration workspace" and "Upload workspace": Only File > Open > Cart and File > Save > Cart options should be enabled, all other options should be grayed out.
- In "Viewer workspace": all the menu options are enabled.
File > Open > Cart
User can open an existing cart file by clicking on
File > Open > Cart. The system displays a file selection box to allow the user to select the cart file. Every cart is stored internally in two files: .cart file and _mtd file. To successfully open a previous cart, it is required that both these files are present in the same directory. If any one of these files is missing, system should display an error message to the user.
There are following 3 use cases:
- If "_mtd" file exists: The system initializes the required plugins and restores the cart to the original state(state when the cart was saved to test.cart file). After cart initialization, system opens the "Cart Manager" docking window, and displays the cart contents.
- If "_mtd" file does not exist: The system displays an error message indicating that the metadata file is missing. Following error window is popped up in this case:
- User selects a file having a different extension(other than ".cart"): The system displays an error message indicating that only ".cart" files can be opened. Following error window is popped up in this case:
File > Open > Workspace
User can open an existing workspace file by clicking on
File > Open > Workspace. The system displays a file selection box to allow user to select the workspace file. Internally, system stores a workspace using two files: .ws file and _mtd file. To successfully open a previous workspace, it is required that both these files be present in the same directory.
There are following use cases:
- User selects a ".ws" file, and corresponding "_mtd" file are present:
- If "Add to existing workspace" option is checked: If the workspace contains other layers, the system will add the "workspace" contents into additional layers, preserving the existing layers.
- If "Add to existing workspace" option is not checked: The system will remove all the layers currently being displayed, and reload the workspace with layers from the stored "workspace".
- User selects a ".ws" file, but the corresponding "_mtd" file is missing: The system will display an error message indicating that the metadata file is missing. In this case, following error window is shown:
- User selects a file with a different extension(other than ".ws"): The system displays an error message indicating that only ".ws" files can be opened. In this case, following error window is shown:
File > Open > Workspace Snapshot
User can open a previously saved workspace snapshot by using this menu item. There are following 2 differences between storing the current session as a workspace vs. saving it as a workspace snapshot:
- When stored as "workspace", system creates a ".ws" file and a "_mtd" file to store the state of application. Where as if stored as "workspace snapshot", system creates a ".wslocal" file, a "_mtd" file.
- When stored as "workspace snapshot", system also downloads the images from sources, and stores these locally.
There are following use cases in this scenario:
- User selects a ".wslocal" file, and all required files are present:
- If "Use Downloaded files" option is checked: System reloads the workspace contents using the image files that are stored locally.
- If "Add to existing workspace" option is checked: If the workspace contains other layers, the system will add the "workspace snapshot" contents into additional layers, preserving the existing layers.
- If "Add to existing workspace" option is not checked: The system will remove all the layers currently being displayed, and reload the workspace with layers from the stored "workspace snapshot".
- If "Use Downloaded files" option is not checked: System reloads the workspace, but this time the image files are fetched from their sources, locally stored image files are not utilized.
- If "Add to existing workspace" option is checked: If the workspace contains other layers, the system will add the "workspace snapshot" contents into additional layers, preserving the existing layers.
- If "Add to existing workspace" option is not checked: The system will remove all the layers currently being displayed, and reload the workspace with layers from the stored "workspace snapshot".
- User selects a ".wslocal" file, but corresponding "_mtd" file is missing: The system will display following error window in this case.
<<<TODO: Add missing _mtd image here>>>
- User selects a ".wslocal" file, but the directory containing downloaded files is missing (or one or several downloaded files are missing): The system will reload the missing image files from the original source. Thus, this is one way for the users to invalidate the cache.
- User selects a file with a different extension (other than ".wslocal"): The system displays an error window in this case as shown below:
<<<TODO: Add wrong file-type image here>>>
File > Save > Cart
User can store the contents of the cart to a file on the local drive by clicking on
File > Save > Cart. This opens a window using which the user can specify the name of the file and its location. Internally the system creates two files to store the cart. (.cart file and _mtd file)
There are following use cases in this scenario:
- User enters a file name (test.cart), which is new: System will store the cart's contents in ".cart" and "_mtd" files.
- User enters a file name (test.cart), but the named file already exists: System will display a message informing user that the file already exists. If the user selects to overwrite the file, the cart contents will be written to this file. Following confirmation window is shown in this case:
- User enters a file name(test): The use cases are similar to the above case, except that the system will automatically add ".cart" extension to the user's input. (i.e. the cart will stored in "test.cart" and "test_mtd" files.)
File > Save > Workspace
User can store the workspace state to a file on the local machine by clicking on
File > Save > Workspace. This will pop up a save window using which the user can specify the file name and its location. Internally, workspaces are stored in two files.(.ws file and a _mtd file)
There are following use cases in this scenario:
- User enters a file name (test.ws), and the file is new: System will store the contents of the workspace in "test.ws" and "test_mtd" files in the location specified by the user.
- User enters a file name (test.ws), but the named file already exists: System will display a message informing user that the file already exists. If the user selects to overwrite the file, the state of the workspace will be stored in this file.
- User enters a file name(test): Use cases are similar to the above case, except that the system should automatically add ".ws" extension to the user's input. (i.e. the workspace state will be stored in test.ws and test_mtd files.)
File > Save > Workspace Snapshot
User can save the contents of a workspace on local machine using this option. The difference between saving a "workspace snapshot" and saving a "simple workspace" is that in case of workspace snapshot, the system downloads all the image data for the workspace from original source URLs and stores it to local disk. Thus, restoring "workspace snapshot" should be faster than restoring "workspace", since all the required data is already downloaded on the user's machine.
Following are the use cases in this scenario:
- User enters a file name (test.wslocal), and the file is new: System will store the workspace contents into "test.wslocal" and "test_wslocal_mtd" files. It will also create a directory named "test_downloaded_files", and download all the images being displayed in the workspace in this directory. These images will be used while restoring the workspace snapshot, instead of fetching the image data from the original sources.
- User enters a file name (test.wslocal), but the file already exists: In this case, system will display a message informing user that the file already exists. If the user selects to overwrite the file, the state of workspace will be stored as mentioned in the earlier use case.
<<TODO: Add image here: .wslocal file already exists. >>
- User enters a file name (test): The use cases in this scenario are same as mentioned earlier, except that the system will automatically create a file "test.wslocal", and use it to store the state of the workspace.
File > Save > Export to image
User can export the contents of a layer into an image file(.jpg/.png format) by clicking on
File > Save > Export to image. This will pop up a save window using which the user can specify the file name and its location.
- User enters a file name (test.jpg or test.png), and the file is new: System will export the current active layer as a JPEG or PNG image depending on the file extension. While exporting, opacity, contrast and brightness values for the layer are preserved.
- User enters a file name (test.jpg or test.png), but the file already exists: System will display a message informing user that the file already exists. If the user selects to overwrite the file, current active layer will be exported to the specified file.
- User enters a filename without any extension: Use cases are similar to the ones mentioned above, except that by default system will create ".jpg" file.