Segmentation in Amira

From CRIPTWiki
Revision as of 15:03, 20 July 2011 by Brewski (Talk | contribs) (Lasso Tool)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Segmentation refers to the idea of ISOLATING and HIGHLIGHTING certain specific structures in a data matrix. It is what allows you to create separate surfaces for each structure within your data set and may be done manually or automatically depending on the type of material that you are segmenting.




Link to: Amira Interface: 3D and Slice Data

Segmentation Mode

For more infomration on Segmentation mode visit Interacting with Amira


Making a Selection, and Creating a Material

The images that you work with in Amira are formed voxels -- a 3D version of a pixel. Essentially each pixel from each slice that you add originally as a part of your data set is assigned a 3D point in space and becomes a 3D cube volume occupying the dimensions of that slice and the distance between that slice and the one next to it. These voxels may then be realigned to create other planes of data projection.


When you interact with a data set in segmentation mode, you are selecting voxels to eventually become part of a given material. Each time you highlight a section, you have the option of adding selected voxels into a created material.


Adding Voxels to a Material

Clicking the add button or pushing "a" on the keyboard will add selected voxels to a given material.

When you originally highlight a section, it will appear as a red-orange colour. This denotes the selection that you are currently interacting with using segmentation tools. This is NOT a saved section, and does not contribute to forming a material until it is added to that material. Clicking the add button will transfer this selection of voxels into a material file. Be sure that you have the appropriate material selected from the materials list before clicking add. Doing this will remove the red-orange colouring and will show an outline of your new material in a colour matching the box beside it's name.

NOTE: A voxel may only be part of 1 (one) material at a time. If you add a voxel to one material, then reselect it and add it to a second material, it will be removed from the first material, and added to the second.


Creating a New Material

To create a new material click the New button to the left of the title Materials. This will allow a new material to pop up in the list which can be renamed (by right clicking and clicking rename), re-coloured (as explained above), and added to via segmentation (as explained above).


Modifying a Material

To change the colour of a material double click the coloured box next to its name, select a new colour from the graded scales or colour wheel and click apply.


Manual Segmentation

There are several tools within Amira which will allow you to manually segment pieces of your data set. They will be explained below.

When the area you are segmenting is of similar colour contrast to surrounding structures (ie. muscles, tissue), manual segmentation is best

Paint Brush

The paint brush works very similarly to that of the paint brush in paint. You click to highlight sections of your slice (shown in orange-red colour)and hold control and click the left mouse button to erase part of a selection (orange-red).

The paint brush is the only tool which allows multiple separate highlights on the same page withough erasing previously highlighted (but not added) work. You may also use this tool in conjunction with other tools to further edit a selection that has been made but not yet added to a material.


Lasso Tool

The Lasso Tool also works very similarly to that of the lasso in paint. Clicking and holding the left mouse button will allow you to draw a free-handed outline of a section. This outline will then be filled in automatically and once red-orange in colour, may be added to a material. To edit this newly selected area (still red-orange) click the paintbrush button and add or subtract voxels as listed above. You may also hold shift to select add multiple areas with the lasso to be added. You can deselect voxels in a red-orange area using the lasso by holding ctrl + shift and then circling the area that you wish to deselect.

NOTE: If you have already selected an area (area 1) using the lasso, selecting another area (area 2) withough first adding area 1 or holding shift will cause deselection of area 1 and selection of area 2.


3D EDITING

A useful function of the lasso tool is the ability interact with the 3-D model. This is useful for separating a single material into many, or removing portions of a material.

1. Ensure that you deslect the 3D box of the material you would like to edit (found in the materials list). Also ensure that you viewer window is set up to show the 3D rendering of your material. Change this by clicking the single window button in the viewer window (top right of button toolbar) until a blank screen (without slides) appears.

2. Select the entire material by pushing the select button within the materials list corresponding to your structure. This will cause your material to re-appear as a red-orange structure.

3. Click the lasso tool in teh bottom of the main window.

4. Beneath the lasso button there are a list of options. Click the circles next to outside in the 3D mode list.

5. In the viewer you are now able to circle the selected structure (red-orange). Anything selected within your lasso shape will remain selected while the remainder will dissappear and be unaffected. This process may take a couple of minutes to load fully. Make sure that you are cognisant of where you place your cuts as you are using a 2D tool, to cut across a 3D object in a single plane.

6. You may now load the selected portion of your material to a newly created material to divide it into separate pieces.

Blow Tool

The blow tool is used to highlight like-coloured areas according to their colour gradient. This tool is particularly useful if you are working with an object that is highly contrasted in colour from those around it (ie. a vessel, or bone). Do not use this tool to highlight sections of like-coloured tissue. This makes it sort of a hybrid between manual (because you control its expanse) and automatic (because it uses thresholding).

To use this tool, first click on the centre of the section you want to highlight, and drag the mouse downwards. This will cause the expansion of a polygon which will progressively include more like-coloured voxels (based on automatic thresholding). Let go of the left-mouse button to select the area. Again, like the lasso tool, to edit this newly selected shape, you must switch over to paintbrush or hold down shift at the same time. Re-selecting a new area using the blow tool without first adding the pre-selected area or holding shift will result in it's removal and the highlighting of a new area.


Automatic Segmentation

Automatic Segmentation is really only good for separating areas of highly contrasting colour. It may be applied to one or all slices, and separates between selected and unselected voxels based on a threshold colour value.

Magic Wand

The Magic Wand tool bases your selection off of voxel colour gradient. You can set the threshold of voxels to be selected by the tool through using the slide bar above the buttons under "display and masking".

To use this tool, click on the magic wand button, then click on the slice. You may choose to highlight voxels within your threshold range on a single slice, or on all slices by clicking the All Slices check box under the segmentation tool buttons. You may also alter your selected threshold range by dragging the ends of the slide bar.

If working on a 2D slice, you may also set a limit for the region within which your highlighting takes place. Do this by drawing a limit line. This does not however work if you're applying your thresholding to all slices at once.

Like the Lasso and Blow tools, you must use the paint brush to further modify your selection after your initial highlighting.


Threshold Tool

The threshold tool works very similarly to the magic wand. It is good for separating parts of your model from everything that is not based on a threshold colour value. To use this tool, click on it. You can adjust the scope of the thresholding using the same slide bar as the magic wand located above the segmentation tools, under "display and masking". When you click on the threshold tool, voxels whose colour value fits within your selected thresholding range will be highlighted in blue. To add these voxels to a material, you need to click select underneath the segmentation buttons. This will turn the colour of selected voxels to a purple-pink (mix of blue + red-orange). You may then add these voxels to a material.


More efficient Segmenting

Interpolation

Interpolation is a very fast way to generate a relatively congruous material. Pressuming your material is fairly smooth (ie makes no sudden turns or juts), interpolation is a good choice.

To use interopolation: 1. Highlight your desired material on a slice using any segmentation tool. 2. Instead of continuing to segment the same material on the next consecutive slice, skip a few (3-5 depending on how much the shape of the material changes) and then highlight the same material on a new slice. 3. Continue in this fashion without adding your new selection to a material. 4. Once you've highlighted an assortment of evenly spaced slides thoughout your material, click on Selection from the list of menus on the top and then select Interpolate from the drop down menu. You may also push "ctrl + i". You will then see the rest of your slices fill in between the ones that you manually segmented. 5. You may now add this large orange-red selection to a material, or edit individual slices using the paintbrush.

This same set of instructions can be used to map out a vessel or nerve that you are not able to see. Essentially, Amira takes the top and bottom slices of a section that you have manually segmented in, and connects their edges as smoothly as possible to generate the data inbetween. You should look back at the automatically generated slices however to make sure that the selected material aligns with its boarders on the 2D slice, and edit accordingly.


Grow or Shrink a Selection

Once you've created a material or selected a series of voxels, you can grow or shrink your entire selection in all directions simultaneously.

To do this:

1. Make sure that your area is highlighted (orange-red in colour). This will be the case if you've just highlighted the selection, but not added it to a material. If you want to grow/shrink a material, select the whole material make sure that you are first in segmentation mode. From there, go to your list of materials and click the Select button at the far right of your material list corresponding to the material you wish to select.

2. You may then press either the grow or shrink button located under the Selection heading and on the far right of the window (looks like a blue splotch with arrows pointing away or to it respectively). You can also carry out the same function by clicking Selection from the top menu bar to open a drop down menu. From here you can Select "grow" or "shrink" followed by current slice, all slices, or volume. Choose the option that best suits your needs.

3. This selection is still only highlighted, so must be added to a material to become permanent. To do so click the add button (+) or "a" on the keyboard.


Keyboard Shortcuts

The following is a list of keyboard keys offering a shortcut to perform a segmenting action:

  • "a": adds a currently selected material (red-orange colour) to a selected existing material
  • "d": changes the appearance of a previously created material on a 2D data slice (keep pushing for variou styles)
  • "ctrl + i": interpolates data between previously selected (though not added) data (see below)
  • "f": fills in the centre of all outlined sections on the screen (red-orange colour)
  • "Right Mouse Click": fills in the center of a single outlined section on the screen (red-orange colour)
  • "s": subtracts a highlighted material from a section
  • "u": is for undo-ing a previous action (similar to Ctrl-Z in other applications)
  • "ctrl": erases when held using the paintbrush tool


Go to Saving Files in Amira

Back to Using Amira