QMRIColors.colorLogRemap — FunctioncolorLogRemap(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.
QMRIColors.relaxationColorMap — FunctionrelaxationColorMap(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 ofx.upLev: Upper bound for color mapping. Defaults to the maximum ofx.
Returns
rgb_vec: A vector of RGB colors representing the mapped values.xClip: A modified version ofxwith values adjusted based onloLevandupLev.
Description
- Calls
read_map_csv(maptype)to load the colormap. - Adjusts
xbased onloLevandupLevto producexClip. - Maps values to colors using
colorLogRemapand converts to RGB.
QMRIColors.relaxationColorMap — MethodrelaxationColorMap(maptype::AbstractString, loLev=0, upLev=256)Simplified variant of relaxationColorMap(). Only to be used if lolev is not used.