-
Notifications
You must be signed in to change notification settings - Fork 78
2. Pre processing
Go from an unprocessed image of many brain slices, to a folder of nice-looking, properly oriented, and ordered brain slice images.
Skip this step if you already have this. Note that all testing was done using .tif files with either 3 (RGB) or 1 channel(s).
Run the first cell (SET FILE AND PARAMETERS
), after setting the following:
- Set the folder where the images are located, e.g.
image_folder = 'C:\Drive\Histology\sample data\slices';
- Set the folder where the should be saved (which can be the same folder), e.g.
save_folder = 'C:\Drive\Histology\sample data\slices';
- Set the names of the images (e.g. here, all .tif files in the folder)
image_file_names = dir([image_folder filesep '*.tif']);
- If you would like to adjust the contrast levels of your slice images, set
adjust_histology_contrast = true;
There are four ways to pre-process data, depending on whether your histology images are already cropped into images of individual slices and on whether they have already been downsampled to 10 microns per pixel.
image_file_are_individual_slices = true;
and use_already_downsampled_image = false;
Run the cell LOAD AND PROCESS SLICE PLATE IMAGES
. Each image is downsampled and can now be adjusted. Instructions appear in the console. Notably, press spacebar to adjust the current image's contrast on the current channel, and press spacebar again to view and save or revert the modified image.
image_file_are_individual_slices = true;
and use_already_downsampled_image = true;
image_file_are_individual_slices = false;
and use_already_downsampled_image = false;
Run the cell LOAD AND PROCESS SLICE PLATE IMAGES
. Each image is downsampled and can now be adjusted. Instructions appear in the console. Notably, press spacebar to adjust the current image's contrast on the current channel, and press spacebar again to view and save or revert the modified image.
image_file_are_individual_slices = false;
and use_already_downsampled_image = true;