Menu

Mask

There can be a demand to use data to generate a mask and then use that mask together with the original data. For example we may want to use a CT series to generate areas close to bones. A set of macro commands can be used to generate non zero pixels in the vacinity of bones and zero elsewhere.

The mask itself loses the details of the image so we would like to mask the image back to the original quality in the area of interest and zero elsewhere. This gives a clear visual indication of exactly what is being included and what is not.

The central idea is that the original data remain unchanged but the mask show the original data only in those places where it is non zero. Thus the title on the dialog box is Original with non zero Mask -> Mask, i.e the mask is changed.

There are 2 ways to use the program, either in dialog mode or in macro mode.

Dialog mode

In the dialog mode the following will appear

Here we assume that you are testing an algorithm and that you have an original image and a mask image which has been generated from it. The mask is non zero in the areas of interest and zero in the areas to be masked out.

What the dialog is asking is to identify which image is the original and which is the mask. To answer this, you click on Original. Then you click on the original image and back onto the dialog. You will see the title of the original image.

You repeat this on Mask. Now the Mask the data button becomes active as shown below:

Macro mode

The Mask can also be run inside a macro. If correct parameters are given no dialog will appear. Two parameters are expected: original title<tab>mask title. The tab character separates the parameters. Here we will assume that the macro picks up the original title and the mask title is given as part of the macro. This might look as follows:

title1 = getTitle();
run("Duplicate...", "title=osseux duplicate");
... other commands of the macro to calculate the mask
run("Mask...", title1 + " osseux");

You can see the tab character before the word osseux in the above run mask command.

Help list


Related

Wiki: Pet Ct Viewer Help

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.