EditMan V1.0:
Manual editor for strip masks
Corresponding author:
EditMan: Download | Help
Getting Started:
- When you launch Editman, a file-picker dialog box will pop up with the title "Select an MRI volume". Choose an existing file that is stored in ANALYZE or VAPET format. Next, another file-picker dialog box will pop up with the title "Select the MASK volume to edit (CANCEL for an empty mask)". An existing mask must have the same dimensions as the MRI volume, but it can be stored in a different file format. If you are starting with an empty mask, expect any results to be written out in the storage format of the MRI volume. IF your mask is not binary (0 & 1), the program will ask if it should be "flattened" and treated as a binary file. If you are deliberately working on a multi-value mask, say no.
As the volumes are read in, the program performs a temporary reorientation to left-right, anterior-posterior, inferior-superior slice ordering based on the orientation flags set in the volume headers. The intent is to make the Axial, Coronal, Sagittal buttons refer to the correct views, and to make the axial slices appear with the front of the head at the top of the screen. If this is true, the left side of axial and coronal slices views will correspond to the left side of the volume. In any event, the mask you edit or create will be restored to the original orientation whenever you save it.
Following volume selection, the main interface pops up (click the picture below for full size). An EditMan.journal file is begun in the current directory. If you run into trouble, this can be useful for diangosing the problem.
Top Panel:
The interface is divided into the top section (global controls) and 4 panels. The names of the MRI and mask files that you selected are displayed in the text box.
The global controls (not in order of appearance) are:
-
UNDO LAST EDIT -- only the most recent edit (in either editing panel) can be undone.
UNDO ALL EDIT HISTORY -- think of the edit history as a chalkboard. Everything that you did since it was last erased is on it and will be undone.
CLEAR EDIT HISTORY -- erases the chalkboard. Typically, I would edit slices to fix the mask around a particular structure (e.g. an orbit) and then both save the intermediate mask and clear the edit history before turning my atttention to another structure.
SAVE INTERMEDIATE MASK -- there is nothing so painful as having your system crash after an hour of editing! A popup will inform you of the temporary filename, which is usually "editman_mask_tmp.xxx". The mask storage format is the same as that of the MRI. If the worst happens, you can restart and read in the temporary mask.
SAVE and EXIT -- you will get a prompt that says "You will be prompted for a filename. Do you really want to exit?" If you do, a file picker will be launched. You are free to select the same mask name that you began with, or you can type in a new name on the selection line. If you choose a new name, the mask will be stored in the same format as the MRI volume.
QUIT (NO SAVE) -- you will be prompted to be sure that you really want to quit. Useful if you want to inspect, but not change a mask. The EditMan.journal file will still be generated.
Ordinary editing / Parcellation -- ordinary editing means you draw and you assign values. Parcellation is meant for multi-valued masks -- read about the Slice Editor panel and then come back to this. Back? If you are showing one or a combination of labels and are in Parcellation mode, all the ROI can do is change the labels that are currently shown. So if you are showing label 2, draw a ROI on part of it and assign a value of 3, it does not matter that the other part of the ROI fell over tissue with label 1. The label 1 voxels are immune until they "show".
REFRESH ALL -- redisplays all windows.
HELP -- there is a little online help to remind you how to use your mouse to draw in the windows (see the discussion under the Slice Editor panel).
Back to Top
- Slice Editor panel (upper left):
-
The draw window will contain an axial slice, with the slice number in cyan at the lower left side of the image. The outline of the mask will be drawn on that slice in red. If there is no mask, there will be no outline. Note: the program will draw multiple closed outlines, EXCEPT in the case where one is enclosed in another. When you edit the mask on a slice you will do so by adding or deleting regions from the current mask.
Buttons/controls to the right of the draw window are:
-
Axial, Coronal, Sagittal -- selects the slice view.
+ 1 slice, - 1 slice -- increments or decrements the slice number of the current view.
Redraw current ROI -- the most recent ROI for each view remains in memory until you draw a new one; it is replotted in cyan.
Capture outline -- takes the outline of the mask for the current slice and turns it into a ROI plotted in cyan. It can only handle one closed region properly.
Auto-refine ROI -- takes the existing ROI and allow it to wiggle into a position with lower intensity. This can be useful for outlining ventricles and the like. For large ROIs it will be quite slow.
Smooth inside ROI -- to use this, draw an ROI that intersects the current boundary of the mask. The portion of the boundary within the ROI will be smoothed (this is geometric smoothing -- it is not influenced by image intensity).
Straighten in ROI -- use is similar to smoothing, but the boundary between the intersection points will be made into a straight line.
Assign ROI -- whatever you have set as the current ROI label (see below) will be assigned to the interior of the ROI.
Assign un-ROI -- whatever you have set as the current ROI label (see below) will be assigned to everything OUTSIDE the ROI (use with caution!).
Delete ROI -- the mask value inside the ROI is set to zero.
Delete un-ROI -- the mask value OUTSIDE the ROI is set to zero.
ROI label: 0 -- You can choose any number between 0 and 20 as the current label (0 is the same as deleting).
Show label: all -- You can select "all" the labels to be treated as the current mask or any one of the 20 possible labels, or a combination. If you ask for a combination, you will get a popup window in which you enter the numbers you want.
-
CYCLE MASK -- clicks on this will swap back and forth between the MRI slice with the outline drawn in red and the MRI slice with the mask applied. Use the latter to check for fully enclosed "holes" in a slice. You can edit in either mode.
TOGGLE CROSSHAIR -- clicks on this will draw a cyan crosshair indicating the current slice intersection point. This is particularly useful if you want to switch over to another view to determine what something is.
STRIPE -- pops up another interface that allows control of the brightness and contrast of the slices. You will note that there is a stripe button in each of the four subwindows -- you can adjust them independently. However, changes will not take effect until you click "DONE" or "APPLY" in the stripe window.
REFRESH -- redisplay the slice, and redraw the current mask outline if applicable. Any regions-of-interest that you have drawn will disappear from the display, even though the most recent one will be retained in memory.
Set Zoom = 1.00 -- this is a droplist of possible zoom values you can set for the slices. If the zoom factor is high, scroll bars will appear on the graphics window to allow you to pan around the image. You can edit at any zoom factor.
Text box -- the value of the mask at the slice intersection point is reported. Note that the intersection point is reported as slice numbers after any reorientation.
- Left Click on Window [Navigation mode] -- sets the intersection point, and causes the text box to be updated with the mask value under that click. Middle Click on Window [Navigation mode] -- activates drawing mode. The cursor should change to a pencil (not available on all systems). You can only get out of drawing mode by completing an outline. Right Click on Window [Navigation mode] -- no action. Left Click on Window [Drawing mode] -- sets a point on the outline (shown in green). You may also click and drag to set points. Middle Click on Window [Drawing mode] -- removes last point on the outline (draws over it in black). Right Click on Window [Drawing mode] -- closes the ROI outline by connecting the first and last points. Remember that no changes are made to the mask until you use an "assign" or "delete" button.
Buttons/controls below the draw window are:
Drawing controls use your mouse or drawing tablet equivalents:
-
Axial, Coronal, Sagittal -- selects the slice view.
Back to Top
- Rendering Editor panel (upper right):
-
The draw window will initially be blank. You can generate an iso-surface rendering of the mask applied to the MRI volume to aid in navigation or to use for editing the mask. Editing on the rendering is not as effective as editing on the slices, but it can be useful in some cases. NOTE : the surface rendering is not automatically updated if you edit in the slices.
Buttons/controls to the right of the draw window are:
-
REFRESH -- redraws the current rendering.
ROI label: 0 -- You can choose any number between 0 and 20 as the current label (0 is the same as deleting).
REDRAW ROI -- the most recent ROI for each view remains in memory until you draw a new one; it is replotted in cyan.
APPLYROI -- whatever you have set as the current ROI label will be assigned to the interior of the ROI. Note: because the rendering is an isosurface of the threshold you selected, the voxels you are editing are not necessarily on the rim of the mask. This is why editing on the rendering is of limited use.
Show label: all -- You can select "all" the labels to be treated as the current mask or any one of the 20 possible labels, or a combination. If you ask for a combination, you will get a popup window in which you enter the numbers you want.
View latitude & View longitude -- these sliders allow you to change the viewpoint. Changing longitude will rotate the brain about the cranial-caudal axis; latitude moves the viewpoint up or down along the current longitude line.
Threshold -- this slider specifies the intensity value within the masked MRI to use for the iso-surface rendering.
ROTATE SURFACE -- applies the latitude and longitude changes. The update time has not been satisfactory for real-time rotation.
TRIANGULATE SURFACE -- computes a new surface rendering at the current latitude and longitude.
Load PRECOMPUTED surface -- once upon a time, we used this feature. You could read in a VTK-format triangular mesh for your surface rather than computing an isosurface.
Buttons/controls below the draw window are:
STRIPE -- pops up another interface that allows control of the brightness and contrast of the slices. You will note that there is a stripe button in each of the four subwindows -- you can adjust them independently. However, changes will not take effect until you click "DONE" or "APPLY" in the stripe window.
Normal color / Merged colors -- If you are working with a mult-valued mask, you can select the Merged option to have the rendering painted with a different color for each label. You will also have to use the Stripe button to set up "Two colortables" -- the right-hand colorstripe will be used to paint the surface. A good choice of colortable is the last one in the list "cerebrum labels".
Repaint surface -- updates the current rendering with the current mask labels.
Drawing controls are the same as for slice editing.
-
REFRESH -- redraws the current rendering.
Back to Top
- Orthogonal Slices panel (lower left):
-
This panel is only for visualization and navigation. You can left-click anywhere on a view to update the intersection point. The new selection will be reflected in the Slice Editor window.
Buttons above the draw window are:
- TOGGLE CROSSHAIR -- plots the intersection planes
TOGGLE MASK -- applies the mask consisting of the currently selected labels (next)
Show Label = all -- as in the Slice Editor panel, you can select one, all or a combination of labels to serve as the mask. The selection here is independent of any selections made in other windows.
- TOGGLE CROSSHAIR -- plots the intersection planes
Back to Top
- Slice Gallery panel (lower right):
-
This panel is also for visualization and navigation. You can left-click on a small slice to update teh intersection point. The new selection will be reflected in the Slice Editor window, if it is showing the same view.
Buttons above the draw window are:
- AXIAL, CORONAL, SAGITTAL -- selects the slice view. Every slice in the volume is shown, with the outline of the current mask labels
TOGGLE MASK -- apply the current mask (recommended if you are looking for enclosed "holes" on slices).
Show label = all -- same behavior as in other panels
STRIPE -- same behavior as in other windows. - AXIAL, CORONAL, SAGITTAL -- selects the slice view. Every slice in the volume is shown, with the outline of the current mask labels
Back to Top
- GENERAL NOTE:
- You will find that whenever you use the STRIPE button in a subpanel, the display in that panel will be refreshed with the window and level settings from the previous call to STRIPE (no matter what panel that was in). This makes it trivial to set up all the slice views to look alike.
Page last updated November 4, 2004.
