QMRIColors.colorLogRemapFunction
colorLogRemap(oriCmap, loLev=0.0, upLev=size(cmap)[1])

Applies logarithmic scaling to oriCmap based on loLev and upLev.

Arguments

  • oriCmap: Original colormap array.
  • loLev: Lower bound of the color range.
  • upLev: Upper bound of the color range.

Returns

  • logCmap: Colormap with logarithmic scaling applied.
source
QMRIColors.relaxationColorMapFunction
relaxationColorMap(maptype::AbstractString, x::AbstractArray, loLev=minimum(x), upLev=maximum(x))

Applies a color mapping to a numerical array x based on a specified relaxation map type. Reads color data from a CSV file and adjusts values in x to provide a color-coded visualization.

This function is commonly used in data visualization, especially for MRI relaxation maps, to display data in a color-coded format for easier interpretation.

Arguments

  • maptype::AbstractString: The relaxation map type to use for color mapping. Common values include "T1", "T2", "R1", "R2", (see documentation).
  • x::AbstractArray: An array of numerical values to be color-mapped.
  • loLev: Lower bound for color mapping. Defaults to the minimum of x.
  • upLev: Upper bound for color mapping. Defaults to the maximum of x.

Returns

  • rgb_vec: A vector of RGB colors representing the mapped values.
  • xClip: A modified version of x with values adjusted based on loLev and upLev.

Description

  1. Calls read_map_csv(maptype) to load the colormap.
  2. Adjusts x based on loLev and upLev to produce xClip.
  3. Maps values to colors using colorLogRemap and converts to RGB.
source
QMRIColors.relaxationColorMapFunction
relaxationColorMap(maptype::AbstractString, loLev=0, upLev=256)

Simplified variant of the above function. Only generates the RGB vector of colors without modifying an array x.

source