Color Maps

From VISTA LAB WIKI

Jump to: navigation, search

This page has information on adjusting, loading and saving color maps in mrVista.

[edit] Where is the color map data?

For mrVista Inplane, Volume, and Flat views, information on the color map is kept separately for each of the display modes: the coherence map, amplitude map, phase map, and parameter map. Generally, these are kept within the ui.[displayMode]Mode field of the view variable. For instance, if you have one inplane window open, and want parameter map data, you could get it by accessing:

INPLANE{1}.ui.mapMode

or using viewGet:

modeInfo = viewGet(INPLANE{1}, 'mapMode');

You might see something like this:

>> modeInfo

modeInfo =

    clipMode: [0 50]
    numGrays: 128
   numColors: 128
        cmap: [256x3 double]
        name: 'user'

The modeInfo struct has six fields:

  1. clipMode: this specifies how to map values in the data overlay to rows in the colormap. All data equal to or less than the lower value will map to the first row of the color map; all data greater than or equal to the higher value will map to the last row; and values in between will map to rows in between, linearly. You can also set it to 'auto', meaning it will always take the largest and smallest values in the data, and stretch the colormap to span these two extremes. If you're in auto mode and threshold things -- say you cut off a map at values of 2 or greater -- then it will map the lowest color map value to 2, because that's the lowest value it can display.
  2. numGrays:
  3. numColors:
  4. cmap:
  5. name:


[edit] Saving and re-loading color map info

If you've set the color map and clip mode to something you like, but is hard to recreate, you can save it for later. Use the menu Colormap | Utilities | Export Map to save the information to a .mat file, and use Import Map to retrieve the saved info. When you import, you may need to referesh the view to see the saved color map: View | Refresh.

Personal tools