Create material and volume map

This dialog box enables the creation of multiple materials from an image or from a textured surface. These materials can be used to automatically create an appropriate transfer function (colour map) for volume rendering. An existing colour map can also be adjusted to optimise the data locations of each material, and both materials and colour map can be edited afterwards.

Creating materials from an image

An image can be loaded using the 'load image' button or simply by dragging it over the top of the chequered area to the left. This can be an image of an object contained in the volumetric data, or something completely different, so long as it contains the colours and materials you want to match, with a similar distribution, and ideally with a fairly plain background. The following slider controls the number of materials to try to extract from this image.

If you only want to create some new materials (perhaps for use in setting the colour of an object, or using them to create your own colour map for volume rendering) then use the 'create materials' button for this. Each created material will be listed in the selection box below. If you want to edit the materials, then the 'edit' button will bring up the material selector in which you can also give each material a name and save it.

Note that this will work even if you do not have any data loaded. In fact, it will give you a default selection of materials even if you do not have an image loaded, which can be helpful if you want to highlight different regions in the data with contrasting colours but don't care what the specific colours are.

If you want to use these materials to create an appropriate volume colour map, then you also need to have some data loaded and be displaying a volume rendering of this data. Having done this, the 'create materials and volume' button will be enabled. As well as creating new materials from an image (or using the default materials if no image has been loaded), this will try to match these materials to appropriate data values, and also set the opacities to appropriate levels. You should try using different numbers of materials until you have a result that you are happy with: this should ideally match both the different materials apparent in the data and in the loaded image.

Note that because this process makes use of the data histogram for volume rendering, it is also affected by the 'gradient noise threshold' slider, so adjusting this will change the optimal data values in the colour map.

Using a textured surface

If you have a data set of an item for which you also have a textured surface (for instance from a laser scan or from photogrammetry of the object), then this textured surface can be used for material extraction and creating a volume colour map.

First, this surface must be loaded and registered to the data, i.e. the textured surface must appear in the same location as the comparative surface within the data. This can be achieved by loading the surface as a shape model in the fit model task page and then following the instructions there to register (align) this model to the data. Having aligned it, you can map the aligned model back to an object using 'map surface', and save it as a new surface in this new coordinate system if required.

Switching to volume rendering allows the combined display of the textured surface and the loaded data. However, the volume colour map will not in general match the colours recorded in the surface texture. Pressing the 'create materials and volume' button will extract different materials from the texture then, by looking at how the data values vary over the surface texture, match these to appropriate data values. The result should be a volume colour map which matches the surface texture, but can be used to show the whole volume.

This process will work well if different materials in the texture match different data values (so for instance correspond to objects with different density in a CT data set). It is less likely to produce satisfactory results for a painted surface where the colours don't match any change in the volumetric data.

Adjusting materials and colour map

Any created materials can be edited with the material selector and, if so, these material edits will be immediately applied to a derived volume colour map. Particularly if you are using an image, it is possible that you will extract appropriate colours, and appropriate data regions, but the right colours are not mapped to the right regions. There is an up/down spin selector next to the list of created materials which can be used to change the location of the currently selected material within the overall list. Again, such changes will be immediately applied to the volume colour map.

The final 'adjust volume' button does not create any new materials, but re-calculates appropriate data regions and moves the current materials in the volume colour map to the newly calculated regions. This will change the data value of each line in the volume colour map but not the materials nor the opacities. It is useful for fine-tuning a pre-stored colour mapping, or perhaps after the windowing has been changed and the data values consequently need adjustment.