Table of Contents
2D Image rendering plugin
User Manual
Introduction
The 2D image rendering plugin allows the user to view and manipulate two-dimensional images. Multiple 2D images can be added to any of the 3 axes (Transverse, Sagittal, Horizontal).
Getting Started
To open a file using the 2D image rendering plugin
- Open the Viewer Workspace.
- If in DualView mode, select the target Viewport (Left-mouse-click anywhere in the viewport in the data display area).
- In the Layer Controls, open the dropdown menu to the right of the Open File button.
- Select 2D image(s). An open file dialog box appears. Navigate to and select the file(s) you want to open (multiple selection allowed using Shift+Left-mouse-click). Click Open. If successful, the opened image(s) will appear in the target viewport and layer GUI controls are added to the Layer Controls panel.
To open an object from the cart
- Open the Viewer Workspace.
- If in DualView mode, select the target Viewport (Left-mouse-click anywhere in the viewport in the data display area).
- Open the Cart Manager.
- Select the cart object(s) you want to open (multiple selection allowed using Shift+Left-mouse-click).
- In the Cart Manager, select the dropdown menu to the right of the Open button.
- Select 2D image(s). If successful, the opened cart object(s) will appear in the target viewport and layer GUI controls are added to the Layer Controls panel.
To add an empty 2D image rendering layer
- Open the Viewer Workspace
- If in DualView mode, select the target Viewport (Left-mouse-click anywhere in the viewport in the data display area).
- In the Layer Controls, open the dropdown menu to the right of the Add Layer button.
- Select 2D image(s). If successful, a layer GUI control is added to the Layer Controls panel.
To add file(s) to an existing 2D rendering plugin layer
- Open the Viewer Workspace
- Select the target layer in the Layer Controls or in the Viewport.
- In the Layer Controls, open the dropdown menu to the right of the Open File button.
- Select 2D image(s). An open file dialog box appears. Navigate to and select the file(s) you want to open (multiple selection allowed using Shift+Left-mouse-click).
- In the sidebar portion of the open dialog box, select the Add to active layer checkbox. Click Open. If successful, the opened image(s) will be added to the currently selected axis in the target layer.
File Formats supported
The 2D rendering plugin was designed to support any of 2D file formats that can be opened with
ImageJ. So far, the following file formats have been verified to open correctly:
- Jpeg
- GIF
- TIFF (color, 16bit greyscale)
- PNG
- BMP
- URLs with MIME type "image/jpeg"
Cart objects supported
- derived classes of Image2D
- derived classes of Image2DSeries
- derived classes of BufferedImageObject
User interface
- GUI controls
- Show/Hide: button to show/hide the layer in the viewport
- Opacity: slider/spinner to adjust the opacity of the layer
- Image(s): slider/spinner to cine through multiple images of the current axis
- Contrast: slider/spinner to adjust the image contrast
- Brightness: slider/spinner to adjust the image brightness
- Axis: radiobutton group to select the current axis to view
- Flip: buttons to flip the images in the X,Y,and Z axes
- Expand/Collapse: button to expand/collapse the GUI controls
- Keyboard controls
- Left/Right Arrows: Previous/Next image
- Up/Down Arrows: Opacity Increase/Decrease
- Status bar: When the layer is selected, a status bar is displayed on the bottom of the viewport that shows:
- Name of layer (top-left)
- Image dimensions (top-right)
- Image Coordinates relative to the lower left corner of the image (bottom-left)
Functional Specification
Data input methods
Serializing/deserializing
In the serialization process, following states are saved:
- Rotation
- Scaling
- Translation
- Brightness
- Contrast
- Opacity
- X-Flip, Y-Flip, Z-Filp values
Deserialization process restores all the above states.
Linking
- 2D Image - 2D Image: changing the GUI controls in the master layer will change all the corresponding controls in the slave layers.
- 2D Image - 3D Volume:
2D Image - 3D Atlas:
- Opacity, Contrast, Brightness, Axis, Flip: mirrors master layer changes
- Image(s): slave layer is set to proportional image number of master layer (ie: if master layer image is set to 50 of 100 then slave layer is set to image 2 of 4)
Workspace Interoperability
None
Error Handling
| Method | Object | Error | Exception thrown | Notes |
load() | File | file not found | yes | java.io.FileNotFoundException |
| unrecognized or bad format | yes | java.util.zip.DataFormatException |
load() | Image2D | URL syntax error | yes | java.net.MalformedURLException |
| URL not found | yes | java.net.UnknownHostException |
| URL connection error | yes | java.io.IOException |
| HTTP page not found | yes | java.io.IOException |
load() | Image2DSeries | all errors | no | No exceptions are thrown for any load error since we want to try to load all the images in the series (ignoring the ones that failed) |
load() | BufferedImageObject | error reading BufferedImage | yes | java.io.IOException |
DarenLee? - 23 Apr 2009