Microscopy Image Browser  1.233
All Classes Files Functions Variables Pages
ib_contrastNormalizationMemoryOptimized.m File Reference

Normalize contrast between the layers of the dataset. More...

Functions

function
handles = 
ib_contrastNormalizationMemoryOptimized (handles, type_switch)
 Normalize contrast between the layers of the dataset. More...
 

Detailed Description

Normalize contrast between the layers of the dataset.

Function Documentation

function handles = ib_contrastNormalizationMemoryOptimized (   handles,
  type_switch 
)

Normalize contrast between the layers of the dataset.

This function requires handles structure of im_browser to get slices/datasets directly. It may work in two modes: the whole dataset or slice-by-slice. After some tests the slice-by-slice mode seems to be faster and more memory friendly for most cases. So it is fixed now in that mode. To change that the useFullDatasetSwitch = 0; should be commented in the following section of the code.

// use the slice-by-slice mode, because it seems to be faster for most cases
// the whole dataset mode make sense for the datasets with a very many sections
useFullDatasetSwitch = 0;
Parameters
handles-> handles of im_broser
type_switcha type of the normalization:
  • 'normalZ' - normalize in the Z-dimension contrast using intensities of each complete slice
  • 'normalT' - normalize in the Time-dimension contrast using intensities of each complete slice
  • 'mask' - normalize contrast using intensities of only masked area at each slice
  • 'bgMean' - shift intensities of each image based on background intensity that is marked as the mask
Return values
handles- handles of im_broser
Required fields of handles:

For normal type:

  • calculate mean intensity and its std for the whole dataset
  • calculate mean intensities and std for each layer
  • shift each layer based on difference between mean values of each layer and the whole dataset, plus stretch based on ratio between std of the whole dataset and current layer

For mask type:

  • calculate mean intensity for the masked or selected area for the whole dataset
  • calculate mean intensities for the masked or selected area for each layer
  • shift each layer based on difference between mean values of each layer and the whole dataset

For bgMean type:

  • calculate mean intensity for the masked or selected area for the whole dataset
  • shift each slice by the mean intensity of the masked or selected areas

References ib_do_backup().

Referenced by menuImageContrast().

Here is the call graph for this function:

Here is the caller graph for this function: