15. Vector

Vector regions of interest (VROIs) are rectangular regions in 2D, 3D, or 4D associated with a FireVoxel document. VROIs are defined by the coordinates of their corners and connecting lines, unlike raster ROIs which are arrays of pixel values.

VROIs are used for annotating subsets of the document, cropping images, measuring distances, placing anatomical landmarks, and as seeds required by several commands (Connected Component by Seed, EdgeWave segmentation, Image-Derived Input Function).

VROIs are shown as semi-transparent rectangles, with sides parallel to the (X,Y,Z) axes of the document (Fig. 15.1). Two intersecting diagonals indicate the position of the VROI center.

The visibility of all VROIs in a document window is toggled using View > Display\Hide Vector. The size of a VROI can be smaller than a single voxel. As a result, a VROI can be nearly invisible.

The Vector menu tab, which is available when images are loaded into FireVoxel, offers the following commands for creating and manipulating VROIs.

Vector ROI

Fig. 15.1 VROI enclosing the left kidney on DCE MRI.

15.1. Construct VROI

To create a VROI:

  • Load an image in FireVoxel. Navigate to the desired slice, view (if multiple orthogonal projections are open), or a frame in a 4D (dynamic) document.

  • Select Vector > Construct Vector ROI (or click Construct vector ROI toolbar icon vroi_icon).

  • Hover the mouse over the selected image. The cursor becomes a cross. VROI is drawn using XOR operation so it inverts the image under itself and remains always visible.

  • Click where the lower left corner of VROI should be. A pair of green circles (handles) appears at the cursor position. Move the mouse towards the upper right. A semi-transparent green rectangle will appear. Move the cursor to the location of the upper right VROI corner and click again to finish. The pointer will revert to a standard white arrow. New VROIs are two-dimensional and span only one slice and only the current frame in a 4D dataset.

  • To exit the VROI tool without drawing a VROI, press Esc.

15.2. Matching VROI coordinates to voxel indices

A VROI is defined by the coordinates of its handles: the lower left (X0, Y0, Z0) and upper right (X1, Y1, Z1) corners.

The VROI coordinates and dimensions are specified as real (decimal) numbers. This leads to the need to map the real-valued VROI coordinates to integer voxel indices, which take integer values (0, 1, 2,…). In FireVoxel, voxel i contains points whose coordinates lie in a semi-open interval [i, i +1) (closed on the left, open on the right). Therefore, voxel 0 extends over the coordinates [0.0, 1.0): coordinate 0.0 is part of the first voxel, whereas the point with coordinate 1.0 is part of the second voxel (Fig. 15.2). This convention holds for each of the {X,Y,Z} axes.

A VROI also has a dynamic index (4th dimension coordinate). Dynamic index takes integer values in the interval [t0, t1] = [1, number of timepoints].

VROI coordinates

Fig. 15.2 Coordinates of VROI (green) matching voxel indices (gray).

15.3. Activate, resize and move a VROI

When a VROI is active, it can be manipulated (moved, resized, rasterized, etc.). To activate a VROI, click on it. Active VROIs show handles – small circles in the lower left and upper right corners. To inactivate a VROI, click anywhere outside the current VROI.

To resize a VROI, left-click a VROI handle (cursor becomes a cross) and drag it to a new location.

To move a VROI without changing its dimensions, right-click an active VROI (the cursor changes to four white arrows) and drag the entire VROI to a new location; release the mouse to finish.

A 2D VROI can be extended into the third dimension manually by viewing the image in orthogonal projections (Display Orthogonal Projections) and dragging the VROI corners across slices.

The VROI can also be extended in 3D or 4D through the Vector ROI properties panel.

15.4. List all VROIs

Generates a list of all VROIs currently associated with the document. Listed are: VROI name, start and end dynamic point. The order corresponds to the internal order within the document. The list will show existing VROIs regardless of the visibility option set by View > DisplayHide VROI.

15.5. Next VROI (also F11 function key)

Displays the next VROI and makes it active. This allows to sequentially switch between existing VROIs, regardless of their visibility. The order is consistent with the order in which VROIs are listed by List all VROIs.

15.6. Save VROIs

Saves all vector ROIs in a file with .vroi extension. All VROIs in a document are saved in one file. The .vroi file can be opened with a text editor. The file shows the total number of ROIs and the VROI label and start and end coordinates in (X, Y, Z, t) for each VROI. The VROI properties can be edited in the .vroi file. The changes will be seen in FireVoxel when this file is loaded into a document.

Note that saving the entire document in the FireVoxel .fvx format also retains all VROIs.

15.7. Load VROIs

Enables loading VROIs from a previously saved .vroi file. No checks are made to identify if the loaded VROI match the current document, or if they are already present in the document. If the VROIs are already present, the loaded VROIs will be displayed on top of the existing ones. Duplicate VROIs can be spotted by their lower transparency.

15.8. Vector ROI 2D > 3D

Converts 2D VROIs (with one dimension less than 1 slice) into 3D VROIs. In the resulting VROI, the smallest dimension (in millimeters) becomes equal in size to the larger of two non-zero dimensions. This function is useful to improve the visibility of created VROI in an orthogonal view.

VROI properties panel

Fig. 15.3 VROI properties panel.

15.9. Vector ROI properties

VROIs can also be adjusted and manipulated via the VROI properties panel (Fig. 15.3). Double left-click on the VROI to open the properties panel. A common mistake is to double right-click, which switches the view to Film view. To recover from this mistake, navigate to the VROI and double right click again to switch back to Slice view. The properties panel can remain open while the user activates different VROIs, uses Next VROI function (F11), or even deletes all VROIs. The options of the VROI properties panel are described below.

15.9.1. Name

Name is a text field for entering and editing VROI names. By default, VROIs are named vroi_N, with the VROI number N starting from 0 for the first created VROI.

15.9.2. Color

Double-click the color swatch to open a standard Windows standard Color selection panel and select the VROI color. The default color for all VROIs is green.

15.9.3. Coordinates

Coordinates are the minimum (X0, Y0, Z0) and maximum (X1, Y1, Z1) VROI values of the lower left and upper right corners of VROI. The values can be changed by typing in the respective box.

15.9.4. Dimensions, center, and units

Dimensions (DX, DY, DZ) are labeled width, height, and depth, respectively. Center specifies the (CX, CY, CZ) coordinates of the VROI center (indicated by intersecting diagonals). These values are recomputed dynamically when VROI coordinates are changed:

DX = X1 – X0,     CX = (X0 + X1)/2

DY = Y1 – Y0,     CY = (Y0 + Y1)/2

DZ = Z1 – Z0,     CZ = (Z0 + Z1)/2

User can also directly modify dimensions and centers. When D or C values are modified, the corresponding minimum and maximum values are recomputed:

X0 = CX – DX/2,    X1 = CX + DX/2

Y0 = CY – DY/2,    Y1 = CY + DY/2

Z0 = CZ – DZ/2,    Z1 = CZ + DZ/2

The coordinates and dimensions are expressed either in voxels or in mm, selected using the Units radio buttons.

15.9.5. Dynamic index interval and All Timepoints

Dynamic index interval indicates the start and end points (T0, T1) spanned by VROI in the fourth, dynamic dimension (time, b-value, TI, flip angle, etc.).

Dynamic index is an integer index of a dynamic frame. For 2D or 3D images, T0=T1=1. For 4D datasets, T0=T1 and equal to the current dynamic frame number.

New VROIs drawn on 4D images exist only on the frame where they are first drawn. To expand a VROI to other frames, enter the numbers of the first and last frames that the VROI needs to cover. Scroll through dynamic frames (right and left arrows) to check whether the VROI has been correctly applied.

All Timepoints command extends the VROI to all frames in a 4D dataset. It is equivalent to setting dynamic index interval to T0=1 and T1=N, where N is the total number of frames in the dataset.

15.9.6. Global adjustments: Center, Full Volume, Scale Dimensions

The three buttons at the bottom of the panel perform global adjustments of VROI properties.

Full Volume changes the minimum (X0, Y0, Z0) and maximum (X1, Y1, Z1) VROI coordinates to the minimum and maximum coordinates of the entire image. The resulting VROI encompasses the entire field of view.

Center changes the coordinates of the VROI center (CX, CY, CZ) to the coordinates of the center of the image.

Scale resizes VROI dimensions from old D to new D’ according to a user-selected scaling factor (scale), while keeping the coordinates of the VROI center unchanged:

DX’ = DX * scale, DY’ = DY * scale, DZ’ = DZ * scale.

15.10. Insert polyline

Launches polyline drawing tool. Clicking polyline toolbar icon launches the same tool. Click the image to place control points connected by straight lines. Press Esc to exit the tool.

Active polylines show green control points, like other vector entities. Click the polyline to activate it. Click away from the polyline to de-activate.

Active polylines can be manipulated. Click and drag individual control points to move and reshape the polyline. Right-click and drag any location on the polyline to move the entire polyline to a new location.

Active polyline can be deleted by pressing Delete.

Visibility of the polylines is toggled by View > Display\Hide Vector.

For a two-point vector, the direction is indicated by an arrow at the end of the vector. The length (in millimeters) is also shown in red next to the vector before the second point is placed. To display the length at all times, use View > Display\Hide Curve Length.

For a three-point sector, the direction is indicated as a green arc with an arrow (from the first segment towards the second segment). The angle measure (in degrees) is shown in green next to the apex of the angle. To display the angle at all times, use View > Display\Hide Curve Length.

The properties of the active polyline can be adjusted by double-clicking the polyline or selecting View > Contour and Fill Properties to open Polyline and Spline properties. The panel allows the user to control the fill, line, and transparency properties, and also convert the polyline into a spline.

15.11. Rasterize selected Vector entities and Rasterize All VROIs

A VROI can be rasterized, or used to create a raster ROI covering the area enclosed by the VROI.

Rasterize selected Vector entities rasterizes the active VROI. The same operation can be performed by clicking vector_rasterize_icon toolbar icon.

Rasterize All VROIs rasterizes all VROIs in the document.

If the document’s active layer is an ROI layer, the results of the Rasterize commands are added to this layer. If the active layer is an image layer, a new layer is created, and the results of the Rasterize commands are added to this new layer. To add a rasterized area to a specific ROI layer, activate this layer first and then apply the Rasterize command.

15.12. Enclose connected components by a Vector ROI

Creates a new VROI around each connected component in the active ROI layer. A message shows the number of VROIs created. If the command is repeated (without any changes made to the raster ROIs or VROIs), no new VROIs are created. If either the VROI or the raster layer have been modified, the command creates a new VROI.

15.13. Delete All Vector ROIs

Delete all VROIs. Polylines and splines are unaffected by this command. The active VROI can be deleted by pressing Delete. The active ROI will be deleted even if it is not visible.

15.14. Delete All Splines

Delete all splines. VROIs are unaffected.