Introduction to FIJI - workflows v. 1.9
Table of Contents
- 1. working with single channel images
- 1.1. opening the image and basic info
- 1.2. opening the image and basic drawing
- 1.3. image inspection
- 1.4. adjust brightness/contrast of all open images
- 1.5. copy pasting from image to image
- 1.6. file handling and non-invasive editing
- 1.7. file handling and invasive editing
- 1.8. LUT and calibration bar
- 1.9. 8-bit and 16-bit pseudocolor images
- 1.10. pseudocolor image to RGB conversion
- 1.11. color spaces
- 1.12. line-tool operations
- 1.13. histogram based intensity transformations
- 1.14. histogram adjustments
- 1.15. using 16 bit images to increase precision
- 2. working with multichannel images
- 3. image processing: thresholding & filters
- 3.1. basic concept of thresholding
- 3.2. basic concept of filtering: binary filters
- 3.3. basic concept of filters: sharpen
- 3.4. edge filters - vertical stripes
- 3.5. edge filters - horizontal stripes
- 3.6. edge filters - checkerboard
- 3.7. Morphological filters - Binary
- 3.8. Morphological filters - Gray
- 3.9. basics mathematical operations on single image
- 3.10. beyond the limits of bits
- 3.11. basics mathematical operations on two images
- 3.12. seeing JPEG artifacts
- 4. background elimination
- 5. manual measurements and working with rois
- 6. automatic measurements
- 7. Segmentation
- 8. Spot detection
- 9. scripting / macros / automation basics
- 9.1. macro recorder - reproducing edits
- 9.2. macro recorder - repeating actions on stack
- 9.3. automatic iteration
- 9.4. automatic iteration - introducing function for stop condition
- 9.5. adding macro to the menu
- 9.6. iterations and variables in the macro: multi-measurement
- 9.7. automatic measurement and saving to a file
- 9.8. user input via GUI
- 9.9. user input via image window / selection
- 9.10. batch mode - basics
- 9.11. batch mode - full control on processing files
- 10. workflow: tracking
- 11. workflow: FRET
- 11.1. preparation part 1 - image import
- 11.2. preparation part 2 - averaging
- 11.3. preparation part 3 - masks
- 11.4. preparation part 4 - ratios
- 11.5. analysis - problem: cell population
- 11.6. preparation part 5 - cropping
- 11.7. analysis - problem: chromatin change
- 11.8. analysis - problem: manual labor
- 12. workflow: scratch assay
- 13. various useful tools
1. working with single channel images
1.1. opening the image and basic info
- file > open samples > HeLa (IJ:26.2)
- image > show info (ctrl-i) (IJ:28.3)
- analyze > tools > scale bar (IJ:30.14.6)
1.2. opening the image and basic drawing
- target: “convert” [geometry-source.tif] into [geometry-target.tif]
- file > open : [geometry-source.tif] (IJ:26.2)
- use following tools to convert source into target:
- [palete > straight line] (IJ:19.12.1)
- try shift
- [palete > color picker] (IJ:19.11)
- e.g. choose black as foreground
- try Draw (d) (IJ:27.9-10)
- [palete > flood fill tool] (IJ:19.16)
- use again: color or picker to choose right color for filling
- [palete > wand tracking tool] (IJ:19.7)
- use to select shapes
- apply Copy (ctrl-c), Paste (ctrl-v), Cut (ctrl-x)
- alternatively select, move selection, choose color and try Fill (f), Draw (d), Clear tools (IJ:27.2 IJ:27.9-10)
- [palete > rectangular selection] (IJ:19.1)
- select a rectangular shape around blue rectangle
- apply Copy (ctrl-c), Paste (ctrl-v)
- [palete > straight line] (IJ:19.12.1)
1.3. image inspection
- open the “single_channel.tif” image (drag & drop, or File > Open)
- Image > Duplicate (IJ:28.9)
- shortcut: D (shift-d)
- Analyze > Histogram (IJ:30.10)
- Shortcut: h
- click “live”
- Image > Adjust > Brightness/Contrast
- play with sliders and Auto and Set and Reset
- observe histogram window–what is changing, what is not?
- click Apply
- what changed?
1.4. adjust brightness/contrast of all open images
- open three single-channel images, in folder “for_exercise_1.4” (drag & drop, or File > Open)
- for all images: Analyze > Histogram (IJ:30.10) (Shortcut: h)
- click “live”
- for one image: Image > Adjust > Brightness/Contrast
- adjust contrast with sliders or Auto
- click Set
- check “Propagate to all other open images”-box
- click OK
- what happened to the histograms?
- what happened to the images?
- did pixel values change?
- pick another image and repeat steps 4–7
- what happened, what is different, is it better/worse?
1.5. copy pasting from image to image
- target: create a figure illustrating the difference in C. elegans phenotype (see elegance-fig.tif) based on elegans.tif example
- file > new > image (IJ:26.1)
- Type: 8bit
- Slices: 1
- Fill with: black
- file > save as > tif : my-elegance-fig.tif (IJ:26.10.1)
- [palete > color picker] (IJ:19.11)
- choose white as foreground and black as background
- file > open : [elegance.tif] (IJ:26.2)
- find two different phenotypes of a worm; for each worm
- select worm with [palete > rectangular selection] (IJ:19.1)
- edit > selection > add to manager (ctrl-t) (IJ:27.12.22)
- analyze > tools > ROI manager
- prepare the template as in elegance example (see elegance-fig.tif)
- [palete > straight line] (ctrl-click to select straight mode) (IJ:19.2)
- use line selection to create two horizontal lines (use shift while drawing)
- create line; Draw (d); move line down; Draw (d); add to selection for future
- [palete > text tool] (IJ:19.8)
- add text for “GFP” and “Brightfield”
- confirm with ctrl-d (or edit > draw)
- use ROI manager to put ROIs into right places (analogous to elegance-fig.tif); for each ROI from original image:
- paste ROI into new image
- move it to desired location
- add it to the ROI manager
- [palete > straight line] (ctrl-click to select straight mode) (IJ:19.2)
- copy paste selected worms to the new images (two channel per worm)
- use ROI to find a worm position
- choose channel: GFP or Brightfield
- copy selection
- choose my-elegance-fig.tif window
- use ROI to select desired paste location
- paste
- repeat procedure for all four images
- file > save (IJ:26.10.1)
1.6. file handling and non-invasive editing
- file > open samples > blobs (shift-b) (IJ:26.4)
- analyze > tools > scale bar (IJ:30.14.6)
- set color, background, position
- check: overlay, bold
- file > save as > tiff : blobs1.tif (IJ:26.10.1)
- saving the image as tiff keeps the scale bar as an overlay, so pixel-values below it are kept
1.7. file handling and invasive editing
- file > open : [blobs1.tif] (IJ:26.2)
- from the previous exercise
- image > info (i) (IJ:28.3)
- image > overlay > remove overlay (IJ:28.14.7)
- analyze > set scale (IJ:30.8)
- set scale such as image is 100 um long in each dimension
- analyze > tools > scale bar (IJ:30.14.6)
- set color, background, position
- check: NO overlay
- file > save as > tiff : blobs2.tif (IJ:26.10.1)
- load again to check the difference (e.g. check info)
1.8. LUT and calibration bar
- target: verrify that images “looking” alike might be different
- file > open samples > blobs (shift-b) (IJ:26.4)
- inspect pixel values (IJ:p.28:Toolbar)
- image > lookup table > invert LUT (IJ:28.15.1)
- change color lookup table
- Image > Look up table > Fire
- analyze > tools > calibration bar (IJ:30.14.7)
- file > open > [blobs16bit.tif] (IJ:26.2)
- change color lookup table
- Image > Look up table > Fire
- analyze > tools > calibration bar (IJ:30.14.7)
1.9. 8-bit and 16-bit pseudocolor images
- file > open samples > blobs (shift-b) (IJ:26.4)
- inspect pixel values (IJ:p.28:Toolbar)
- image > lookup table > invert LUT (IJ:28.15.1)
- analyze > tools > calibration bar (IJ:30.14.7)
- file > open > [blobs16bit.tif] (IJ:26.2)
- inspect pixel values (IJ:p.28:Toolbar)
- alternatively use Pixel Inspector (IJ:19.20)
- analyze > tools > calibration bar (IJ:30.14.7)
- file > open samples > blobs (shift-b) (IJ:26.4)
- add arrow in overlay (IJ:19.13)
- play with the look of the arrow (i.e. colors, thickness)
- indicate a blob which you like
- confirm by ctrl-b (IJ:19.8)
- add arrow in draw (IJ:19.13)
- confirm by ctrl-d (IJ:19.8)
- mark a part of image with overlay brush (IJ:19.18)
- play with transparency
- cover blobs marked by arrows with red paint
1.10. pseudocolor image to RGB conversion
- file > open samples > blobs (shift-b) (IJ:26.4)
- image > duplicate (IJ:28.9)
- rename images: left and right
- image > rename (IJ:28.10)
- change color lookup table for left and right
- Image > Look up table > Fire | green
- duplicate both images (IJ:28.9)
- name them left-1 and right-1
- image > stack > tools > combine (IJ:28.6.15.1)
- select left and right
- select left-1
- image > type > Color RGB (IJ:7)
- check with picker what are the values in pixels (IJ:p.28:Toolbar)
- select left-2
- image > type > Color RGB (IJ:7)
- image > stack > tools > combine (IJ:28.6.15.1)
- select left-1 and right-1
1.11. color spaces
- file > open : [blob-combined.tif] (IJ:26.2)
- plugins > Color Inspector 3D
- switch “Display mode” to histogram
- play with color: rotation | saturation | brightness
- compare RGB space with e.g. LAB
1.12. line-tool operations
goal: familiarize you with manual histogram adjustment and some built in rutines making this task easier
- file > open samples > blobs (shift-b) (IJ:26.4)
- image > lookup tables > invert LUT (IJ:28.15.1)
- analyze > histogram (IJ:30.10)
- mark live
- select line tool (IJ:19.2) (IJ:p.28:Interface)
- analyze > plot profile (IJ:30.11)
- mark Live
- move line
- double click on line icon
- change line thickness (move line)
- edit > selection > select none
- image > adjust > brightness/contrast (IJ:28.2.1)
- play with settings to achieve white blobs and black background (actually you almost thresholded image)
- apply when finished (note: pixel values are altered)
1.13. histogram based intensity transformations
- file > open samples > M51 galaxy (IJ:26.4)
- (2x) image > duplicate (IJ:28.9)
- (3x) analyze > histogram (IJ:30.10)
- mark live
- check log button
- on each image
- process > enhance contrast (IJ:29.5)
- normalize checked
- process > enhance contrast (IJ:29.5)
- equalize checked
- process > enhance local contrast (CLAHE)
- http://fiji.sc/wiki/index.php/Enhance_Local_Contrast_(CLAHE)
- try different setting (block size ~30, histogram bins ~200, max slope: ~30)
- what settings brings the result close to the (global) histogram equalization?
- what happens at small block sizes and large max slopes? why?
- process > enhance contrast (IJ:29.5)
- compare the results
1.14. histogram adjustments
- target: familiarize with manual histogram adjustment and HiLo LUT
- file > open > [dudes.jpg] (IJ:26.2)
- analyze > histogram (IJ:30.10)
- mark live
- image > lookup tables > invert LUT (IJ:28.15.1)
- image > adjust > brightness/contrast (IJ:28.2.1)
- play with settings to increase contrast in the image (actually you almost thresholded image)
- apply when finished (note: pixel values are altered; see histogram)
- process > enhance contrast (IJ:29.5)
- equalize un-checked
- normalize un-checked
- What is happening when saturated pixels is equal to 5%?
1.15. using 16 bit images to increase precision
- file > open samples > M51 galaxy (IJ:26.4)
- image > lookup tables > fire (IJ:28.15)
- image > duplicate (IJ:28.9)
- (2x) analyze > histogram (IJ:30.10)
- mark live
- check log button
- on first image:
- image > type > 8 bit
- process > enhance contrast (IJ:29.5)
- equalize checked
- on second image:
- process > enhance contrast (IJ:29.5)
- equalize checked
- process > enhance contrast (IJ:29.5)
- for both img.: image > lookup tables > fire (IJ:28.15)
- select center of the galaxy with [palete > rectangular selection] (IJ:19.1)
- edit > selection > add to manager (ctrl-t) (IJ:27.12.22)
- analyze > tools > ROI manager
- switch window to second image
- click ROI you just added that it appears in the second image
- analyze > set measurements (IJ:30.7)
- check: mean gray value / standard deviation
- for both img.: analyze > measure (m) (IJ:29.12.1)
- for both img.: image > lookup tables > glasbey (IJ:28.15)
- compare the results
2. working with multichannel images
2.1. create new image
- target: create a sketch of a cell as in [cell.tif]
- file > new > image (IJ:26.1)
- Type: 8bit
- Slices: 2
- Fill with: black
- [palete > brush] (IJ:19.4)
- right click on the [palete > brush]
- uncheck: “Paint in overlay”
- right click on the [palete > brush]
- [palete > color picker] (IJ:19.11)
- choose red as foreground
- Draw an outline of a cell ;)
- image > color > channel tool (ctrl-z) (IJ:28.5.3)
- make composite (IJ:28.5.5)
- Switch a slice with a slider
- [palete > color picker] (IJ:19.11)
- choose blue as foreground
- Draw cell nuclei
- [palete > brush] (IJ:19.4)
- right click on the [palete > brush]
- check: “Paint in overlay”
- right click on the [palete > brush]
- [palete > color picker] (IJ:19.11)
- choose blue as foreground
- Draw cell vesicles
- Inspect pixel values (IJ:p.28:Toolbar)
- alternatively use Pixel Inspector (IJ:19.20)
- switch a slice with a slider
- move inspector between: outline | nuclei | vesicles
- image > color > channel tool (ctrl-z) (IJ:28.5.3)
- switch between composite | color | grey
- file > save as > tif : my-cell.tif (IJ:26.10.1)
2.2. composite images - splitting and merging
- file > open samples > fluorescent cells (IJ:26.4)
- image > color > arrange channels
- click on New 1, and select magenta
- image > color > split channels (IJ:28.5.1)
- merge channels to composite
- image > color > merge channels (IJ:28.5.2)
- check “create composite” box (IJ:28.5.2)
- LUT
- change LUT of the channels (LUT in the “startup tools”)
- color blindness
- image > color > simulate color blindness
- image > color > dichromacy
2.3. composite images - individual channel corrections
goal: create an image with brightfield / red / cyan channels which shows locations with strongest expression of these fluorophores
- file > open samples > neuron (IJ:26.4)
- image > color > channel tool (IJ:28.7.5)
- for each channel
- adjust contrast such as final image “conveys the message” (IJ:28.2.1)
- Make sure to select the same channel in the channel tool and with the slider in the image window otherwise you may be surprised that adjusting has no visible effect
- Save as jpg or Image > Type RGB color to remove other channels
2.4. microscopy stacks handling
goal: make a video and a picture for publication showing progression of mitosis in time (see: mitosis-montage.tif)
- open : [mitosis-mixedStack.tif] (IJ:26.2)
- image > hyperstacks > reorder hyperstacks
- swap z with t (it is to overcome issues with make montages)
- image > stacks > tools > make substack (IJ:28.6.15.7)
- choose only one z slice e.g. 3rd one
- image > duplicate (IJ:28.9)
- check duplicate hyperstack
- image > color > channels tool (shift-z) (IJ:28.7.5)
- split channels (IJ:28.5.1)
- for both C1 and C2 images
- choose LUT Fire (IJ:19.7)
- create channel label (IJ:19.8)
- image > type > color RGB (IJ:7)
- for original two channel image
- image > type > color RGB (IJ:7)
- image > stacks > tools > combine (IJ:28.6.15.1)
- choose left: 2 channel image
- choose right: C1
- image > stacks > tools > combine (IJ:28.6.15.1)
- choose left: merged image
- choose right: C2
- image > stacks > series labeler
- select time and other options; use preview to peek
- file > save as > avi (IJ:26.10.1)
- e.g. 10 frames per sec.
- image > stacks > make montage (IJ:28.6.8)
- play with settings:
- columns 1
- rows 5
- increments 12
- play with settings:
- file > save as > tiff (IJ:26.10.1)
3. image processing: thresholding & filters
3.1. basic concept of thresholding
target: Threshold blob.gif image to create a mask enabling segmentation of blob-like structures (i.e. create an image where the values of all pixels not belonging to blob-like structures are set to 0, and all other pixel values are equal to 255).
- file > open samples > blobs (IJ:26.4)
- image > lookup table > invert LUT (IJ:28.15.1)
- image > duplicate (IJ:28.9)
- image > adjust > threshold (IJ:28.2.4)
- set up sliders and Dark background checkbox and threshold the image:
- use 126 value as threshold
- note: pixel values are altered
- (optional) image > adjust > auto threshold
3.2. basic concept of filtering: binary filters
goal: see different binary operations in action
- open : [blobs-thr.tif] (IJ:26.2)
- image > duplicate (IJ:28.9)
- process > binary > watershed (IJ:29.8.12)
- process > noise > remove outliers (IJ:29.6.5)
- check preview
- list bright
- (process > find maxima) (IJ:29.4)
- (2x) process > binary > erode (IJ:29.8.3)
- process > find edges (IJ:29.3)
- process > binary > fill holes (IJ:29.8.8)
3.3. basic concept of filters: sharpen
- file > open samples > hela cells (IJ:26.4)
- process > filters > unsharp mask (IJ:29.11.8)
- check how it behaves when image is composite / color (use channel tool for this purpose) (IJ:28.7.5)
3.4. edge filters - vertical stripes
- open
vertical_stripes.tif
- duplicate the
vertical_stripes.tif
original imageImage > Duplicate
(shortcut:shift-d
) (IJ:28.9)
- apply horizontal Prewitt filter:
Process > Filters > Convolve…
as kernel input (Prewitt):
-1 -1 -1 0 0 0 1 1 1
- click on OK.
- do you understand the output of this process?
- duplicate the
vertical_stripes.tif
original image - apply vertical Prewitt filter:
Process > Filters > Convolve…
as kernel input (Prewitt):
-1 0 1 -1 0 1 -1 0 1
- click on
OK
. - do you understand the output of this process?
3.5. edge filters - horizontal stripes
The steps in this exercise are identical to 3.4—only the input image differs
- open
horizontal_stripes.tif
- duplicate the
horizontal_stripes.tif
original imageImage > Duplicate
(shortcut:shift-d
) (IJ:28.9)
- apply horizontal Prewitt filter:
Process > Filters > Convolve…
as kernel input (Prewitt):
-1 -1 -1 0 0 0 1 1 1
- click on OK.
- do you understand the output of this process?
- duplicate the
horizontal_stripes.tif
original image - apply vertical Prewitt filter:
Process > Filters > Convolve…
as kernel input (Prewitt):
-1 0 1 -1 0 1 -1 0 1
- click on
OK
. - do you understand the output of this process?
3.6. edge filters - checkerboard
The steps in this exercise are identical to 3.4 or 3.5—only the input image differs
- open
checkerboard.tif
- duplicate the
checkerboard.tif
original imageImage > Duplicate
(shortcut:shift-d
) (IJ:28.9)
- apply horizontal Prewitt filter:
Process > Filters > Convolve…
as kernel input (Prewitt):
-1 -1 -1 0 0 0 1 1 1
- click on OK.
- do you understand the output of this process?
- duplicate the
checkerboard.tif
original image - apply vertical Prewitt filter:
Process > Filters > Convolve…
as kernel input (Prewitt):
-1 0 1 -1 0 1 -1 0 1
- click on
OK
. - do you understand the output of this process?
3.7. Morphological filters - Binary
- Open image
exercise_morphology.tif
- duplicate the image 4 times and name each copy as following
- Eroded
- Dilated
- Closed
- Opened
- Apply binary morphological filters
Process > Binary
(Erode, Dilate, Close, Open)- Note: Make sure you apply the operation that corresponds to the name of each image.
- Report findings
3.8. Morphological filters - Gray
- Open image
exercise_morphology.tif
- Apply Gray Morphological filters:
Process > Morphology > Gray Morphology
- Apply Image opening with circular structuring element with radius 3 - removes noise
- Report: did it get rid of the noise?
- Apply Image opening with circular structuring element with radius 5
- Report: did it get rid of the tentacles from the top-left object?
- With the line tool, measure the diameter of the holes in the bottom-right object.
- Apply Image closing with circular structuring element with radius slightly larger than the radius
- Report: did it get rid of the tentacles from the top-left circle?
3.9. basics mathematical operations on single image
- open : [f2.tif] (IJ:26.2)
- process > math > add (IJ:29.9.1)
- play with different functions
- check what happens when image is 32 bit
3.10. beyond the limits of bits
- target: Perform consecutive addition and subtraction of the same value from an image. Compare the results with original image.
- open : [spooked_16bit.tif] (IJ:29.9.1)
- image > duplicate (IJ:28.9)
- work on the copy
- process > math > add (IJ:29.9.1)
- add value: 600
- process > math > subtract (IJ:29.9.2)
- subtract value: 600
- comapare the original and the copy: are they the same? What has happened?
3.11. basics mathematical operations on two images
- open : [f2.tif] and [f1.tif] (IJ:26.2)
- process > calculator (IJ:29.13)
- start with add
- check what happens when image is 32 bit
- play with different functions
3.12. seeing JPEG artifacts
target: Save the same image in TIFF and JPEG formats. Compare the differences
- file > open : [tulip.tif] (IJ:26.2)
- image > duplicate (IJ:28.9)
- work on the copy
- file > save as > jpg (IJ:26.10.3)
- tulip.jpg
- [palete > pencil ] (IJ:19.19)
- modify value of only one pixel
- file > save as > jpg (IJ:26.10.3)
- tulip-1px.jpg
- close all jpeg files and reopen them
- process > calculator (IJ:29.13)
- image1: tulip.tif
- operation: subtract
- image2: tulip.jpg
- checked: create new window
- checked: 32 bit result
- process > calculator (IJ:29.13)
- image1: tulip-1px.jpg
- operation: subtract
- image2: tulip.jpg
- checked: create new window
- checked: 32 bit result
- questions:
- What are the differences between images tif and jpg images? Why?
- How many pixels are affected by changing only 1 pixel in jpg image? Why?
4. background elimination
4.1. dividing by background image
- target: Estimate the local ratio of increase by dividing the image by background. Check the impact of 32-bit image conversion on the quatlity of the result.
- file > open : [xxx.tif] (IJ:26.2)
- file > open : [xxx_background.tif] (IJ:26.2)
- process > calculator (IJ:29.13)
- image1: xxx.tif
- operation: subtract
- image2: xxx_background.tif
- checked: create new window
- checked: 32 bit result
- process > calculator (IJ:29.13)
- image1: xxx.tif
- operation: subtract
- image2: xxx_background.tif
- checked: create new window
- unchecked: 32 bit result
- question: what is the reason of posterization ?
4.2. background elimination - flat field correction
- file > open > cell colony (IJ:26.4)
- use selection to draw a horizontal line across the image (IJ:19.2)
- analyze > plot profile
- check live
- process > subtract background
- click: preview
- click: create background
- vary: rolling ball radius
- try: sliding paraboloid
4.3. background elimination - flat field correction using Image calculator
- file > open samples > cell colony (IJ:26.4)
- image > duplicate (IJ:28.9)
- process > filters > gaussian blur % sigma ~= 30 (IJ:29.11.2)
- measure mean of blurred image (select it, “a”, “m”) (IJ:29.12.1)
- process > calculator plus > divide (i1 = image, i2 = blurred image, k1 = mean, k2 = 0)
5. manual measurements and working with rois
5.1. measuring fluorescence within a selection
- task : measure average flu. in Red channel in neuron
- file > open samples > neuron (IJ:26.4)
- image > color > channel tool (IJ:28.7.5)
- split channels (IJ:28.5.1)
- close all but green and red
- work on green image
- image > duplicate (IJ:28.9)
- process > filters > gaussian blur (IJ:29.11.2)
- use preview to set parameters
- image > adjust > threshold (IJ:28.2.4)
- threshold to create neuron mask (avoid false negatives)
- use wand tool to select main part of the neuron (IJ:19.7)
- analyze > tools > roi manager (IJ:30.14.5)
- roi manager > add (t) (IJ:27.12.22)
- choose second copy of green
- image > adjust > threshold (IJ:28.2.4)
- threshold to create neuron mask (avoid false negatives)
- edit > selection > create selection (IJ:27.12.11)
- roi manager > add (t) (IJ:27.12.22)
- edit > selection > select none (ctrl-shift-a) (IJ:27.12.2)
- process > noise > remove outliers (IJ:29.6.5)
- use preview; remove some of the outliers outside of neuron
- edit > selection > create selection (IJ:27.12.11)
- roi manager > add (t) (IJ:27.12.22)
- image > adjust > threshold (IJ:28.2.4)
- analyze > set measurements (IJ:30.7)
- check: area / area fraction / mean gray value
- work on red image
- choose multi point tool (IJ:19.5)
- select some points in the neuron
- edit > selection > enlarge (IJ:27.12.14)
- roi manager > add (t) (IJ:27.12.22)
- choose multi point tool (IJ:19.5)
- for each selection
- analyze > measure (m) (IJ:29.12.1)
- roi manager > more > save selection (IJ:30.14.5)
5.2. measuring geometrical properties in the image
- task : measure average flu. in Red channel in neuron
- file > open samples > neuron (IJ:26.4)
- use polygon selection tool to measure cell body area (IJ:19.1.6)
- use measure to get the read out after creating polygon (IJ:29.12.1)
- roi manager > add (t) (IJ:27.12.22)
- use measure to get the read out after creating polygon (IJ:29.12.1)
- use segmented line tool (IJ:19.2.2) to measure length of few dendrites
- test shift and alt while adding points (with mouse over a point)
- use measure to get the read out after creating a line (IJ:29.12.1)
- roi manager > add (t) (IJ:27.12.22)
- use angle tool (IJ:19.2.2) to measure length of few dendrits
- use measure to get the read out after creating an angle (IJ:29.12.1)
- roi manager > add (t) (IJ:27.12.22)
- roi manager > more > save selection (IJ:30.14.5)
6. automatic measurements
6.1. identifying and measuring objects - basics
- open : [blobs-thr.tif] (IJ:26.2)
- image > duplicate (IJ:28.9)
- process > binary > watershed (IJ:29.8.12)
- process > noise > remove outliers (IJ:29.6.5)
- check preview
- analyze > set measurements (IJ:30.7)
- check: area / area fraction / mean gray value
- analyze > analyze particles (IJ:30.2)
- test different options
6.2. identifying and measuring objects - cells #1
- target: measure distribution of RFP signal inside nucleus across cell population
- open : [hela1.tif] (IJ:26.2)
- image > adjust > threshold (IJ:28.2.4)
- test different option to isolate cells
- question: What are the difficulties?
6.3. identifying and measuring objects - cells #2
- target: measure distribution of RFP signal inside nucleus across cell population
- open : [hela2.tif] (IJ:26.2)
- image > color > split channel (IJ:28.5.1)
- work on blue channel (DAPI)
- image > adjust > threshold (IJ:28.2.4)
- process > binary > watershed (IJ:29.8.12)
- process > noise > remove outliers (IJ:29.6.5)
- check preview
- analyze > set measurements (IJ:30.7)
- check: area / area fraction / mean gray value
- redirect to: RFP
- analyze > analyze particles (IJ:30.2)
- analyze > distribution (IJ:30.4)
- choose: gray value
7. Segmentation
7.1. DAPI segmentation with thresholding
- open
DAPI.tif
(single-channel image) - change LUT to Grays
Image > Adjust > Threshold
- understand the function of the
Dark Background
checkbox (inspect pixel values) - try setting sliders manually
- try different algorithms
Image > Adjust > Auto Threshold
, if you want to see all at the same time
- try different display options (
Red
,B&W
,Over/Under
)—do you understand what they show - when happy with result, click
Apply
- save the resulting binary image (
File > Save As > Tiff...
) - Apply watershed to divide touching objects
- select the binary image
Process > Binary > Watershed
- proceed with
Analyze > Analyze Particles
- select
Exclude on edges
andAdd to Manager
- click on
OK
- select
- Bonus: repeat step 11 but use the
Size
andCircularity
options to try to exclude some particles and theShow
dropdown menu to visualize different outputs. - Set the parameters you want to measure:
Analyze > Set measurement
- select
Area
,Mean gray value
,Min & max gray value
,Display label
- click on
OK
- Select the original image (open it again as in step 1 if you do not have it)
- In the
ROI Manager
, click onDeselect
and then onMeasure
- Save the
Results
table as .csv (select the table and click onFile > Save As…
)
7.2. DAPI segmentation with filters and thresholding
- open
DAPI_noise.tif
- change LUT to Grays
Image > Adjust > Threshold
- understand the function of the Dark Background checkbox (inspect pixel values)
- try setting sliders manually. Can you find a good threshold range?
- try different algorithms. Can you find one that gives a good result?
Image > Adjust > Auto Threshold
, if you want to see all at the same time
- duplicate the
DAPI_noise.tif
imageImage > Duplicate
(shortcut:shift-d
) (IJ:28.9)
- apply a filter of your choice (Mean, Gaussian Blur, Median, …)
Process > Filters
- check the
Preview
checkbox - change the
Radius
/Sigma
. What happens to the image? - when you are happy, click on
OK
- now perform steps 5 and 6 again
- repeat steps 8, 5 and 6 until happy with result, then click
Apply
- save the resulting binary image (
File > Save As > Tiff...
) - Apply watershed to divide touching objects
- select the binary image
Process > Binary > Watershed
- proceed with
Analyze > Analyze Particles
- select
Exclude on edges
andAdd to Manager
- click on
OK
- select
- Bonus: repeat step 11 but use the
Size
andCircularity
options to try to exclude some particles and theShow
dropdown menu to visualize different outputs. - Set the parameters you want to measure:
Analyze > Set measurement
- select
Area
,Mean gray value
,Min & max gray value
,Display label
- click on
OK
- Select the original image (open it again as in step 1 if you do not have it)
- In the
ROI Manager
, click onDeselect
and then onMeasure
- Save the
Results
table as .csv (select the table and click onFile > Save As…
)
7.3. DAPI segmentation with Weka
- open
hela-1.tif
(single-channel image) - change LUT to Grays
Plugins > Segmentation > Trainable Weka Segmentation
- draw a line outside a nucleus
- click
Add to class 1
- draw a line inside a nucleus
- click
Add to class 2
- click
Train classifier
- repeat the last four steps until happy with result
- click
Get probability
- inspect the probability maps, do you understand the meaning of the values of the pixels in the different channels?
- click
Create result
- inspect results, do you understand the meaning of the values of the pixels in the different channels?
- you now have a binary image, but not the kind Fiji likes
- to measure, proceed by thresholding (“set” both threshold values to 1), then Analyze Particles, etc
- alternatively, multiply all values in the Weka output image by 255, then apply Binarize, etc
- save the resulting image (
File > Save As > Tiff...
) with name “myWekaHeLa1.tif” - Bonus round: play with Settings
7.4. DAPI double-segmentation with Weka
- open hela-1.tif (single-channel image)
- change LUT to Grays
Process > Enhance Contrast > Histogram Equalization
Plugins > Segmentation > Trainable Weka Segmentation
- draw a line outside the cells
- click
Add to class 1
- draw a line inside a nucleus
- click
Add to class 2
- draw a line inside the cytoplams
- click
Add to class 3
- click
Train classifier
- repeat the last six steps until happy with result
- inspect the probability maps, do you understand the meaning of the values of the pixels in the different channels?
- click
Create result
- inspect results, do you understand the meaning of the values of the pixels in the different channels?
- you now have an image with three values
- to measure, proceed by thresholding at 0, 1, and 2, to extract each class (use Set and then set both thresholds to 0, 1, or 2)
- then proceed with Analyze Particles, etc for each of the classes of interest (nuclei and cytoplasm)
- Bonus round: play with Settings
7.5. DAPI segmentation with StarDist
- Follow StarDist installation instructions from here
- open
hela-1.tif
(single-channel image) - change LUT to Grays
Plugins > StarDist > StarDist 2D
Model: Versatile (fluorescent nuclei)
- click
OK
and wait - after result shows
- select original image
- select
ROI Manager
- check the
Show All
box
- comment on the result, is it good/bad?
7.6. H&E segmentation with StarDist
- open
H&E_retina.jpg
(RGB image) Plugins > StarDist > StarDist 2D
Model: Versatile (H&E nuclei)
- click
OK
and wait - after result shows
- select original image
- select
ROI Manager
- check the
Show All
box
- comment on the result, is it good/bad?
- duplicate original image
- re-scale it by factor of 0.5 in x and y (Image > Scale)
- apply StarDist again and overlay the ROIs as above
- is there a difference? why?
8. Spot detection
8.1. manual spot detection with the Multi-point Tool (IJ:19.6)
- read all the next steps before beginning
- open
spot_detection/beads_001.tif
- right-click (ctrl-click) on the
Point Tool
in the tool bar and selectMulti Tool
- double-click on the
Point Tool
in the tool-bar and customize to your liking (test on image, clear points by shift-a) - count all beads by clicking on them one by one
- how long did it take you to click on all the beads (measure with stopwatch the time it took to complete the previous step)?
- save results to the
ROI Manager
(t) then to file (More >> Save …) - click
measure
in theROI Manager
to get number of spots
8.2. algorithmic spot detection with Find Maxima (IJ:29.4)
- open
spot_detection/beads_001.tif
Process > Find Maxima ...
- check
Preview point selection
- try different values for
Prominence
and the three check-boxes - try each of the possibilities in the pull-down (remember to click OK to apply your selection)
- what is the difference and what could the different outputs be used for?
- tip: shift-u allows you to pin sub-menus of the control panel for quick selection, e.g. the Process menu
- add you detected maxima (
Point Selection
) to theROI Manager
and save to file - load saved ROIs from the manual detection exercise and compare results
- how many beads do you get and how does the number compare to your manual count?
8.3. automatic spot segmentation with thresholding
- open
spot_detection/beads_001.tif
Image > Adjust > Threshold ...
- select
Otsu
, then apply
- select
Analyze > Set Measurements ...
+ [X] Area + [X] Mean gray value + [X] Display label
Analyze > Analyze Particles ...
+ Show: Overlay Masks + [X] Display results + [X] Clear Results + [X] Summarize + [X] Add to Manager
- save ROIs to file
- Compare results to the previous two approaches
- Do they differ significantly from each other?
- Which performed better?
8.4. spot detection with noise
- Repeat 8.2 with
with_noise_8000.tif
- consider smoothing the image first:
Process > Smooth
(this is a 3x3 mean filter)
- consider smoothing the image first:
- Repeat 8.3 with
with_noise_8000.tif
- consider smoothing the image first:
Process > Filters
- then pick one
- consider smoothing the image first:
- Compare and comment on the performance of the two methods
- Which one is better?
- Why/how is it better?
8.5. spot detection with variable background
- Repeat 8.2 with
beads_001_ramp.tif
- Repeat 8.3 with
beads_001_ramp.tif
- Compare and comment on the performance of the two methods
- Which one is better?
- Why/how is it better?
- What could be done to the image to make thresholding work better?
9. scripting / macros / automation basics
9.1. macro recorder - reproducing edits
- target: save the edit chain for later (to save work and to document parameters used by different filters)
- plugins > macro > recorder (IJ:31.1.4)
- file > open samples > mri-stack (IJ:26.4)
- process > filters > gaussian blur with sigma ~= 2 (IJ:29.11.2)
- image > adjust > threshold (IJ:28.2.4)
- select manually threshold such as the head is separated from background
- ignore small holes
- uncheck box: calculate threshold for each image
- select manually threshold such as the head is separated from background
- process > binary > fill holes (IJ:29.8.8)
- (optional) use analyze > set scale to calibrate the measurement units
- 200 pixels is 25 cm
- Question: What are the benefits of storing such a macro?
9.2. macro recorder - repeating actions on stack
- target: calculate the volume of human skull
- file > open samples > mri-stack (IJ:26.4)
- use steps below or macro developed in previous excercise
- process > filters > gaussian blur % sigma ~= 2 (IJ:29.11.2)
- image > adjust > threshold (IJ:28.2.4)
- select manually threshold such as the head is separated from background
- ignore small holes
- select manually threshold such as the head is separated from background
- process > binary > fill holes (IJ:29.8.8)
- (optional) use set scale to calibrate the measurement units
- 200 pixels is 25 cm
- plugins > macro > recorder (IJ:31.1.4)
- analyse > measure (IJ:29.12.1)
- image > stacks > next slice (IJ:28.6.3)
- in recorder click
create
button use copy paste to execute the same action many times:
run("Next Slice [>]"); run("Measure"); run("Next Slice [>]"); run("Measure"); run("Next Slice [>]"); run("Measure"); run("Next Slice [>]"); run("Measure");
- Question: how to compute volume of human skull based on the measurement?
9.3. automatic iteration
- target: avoid copy pasting - use iteration instead
- continue from last example or open preprocessed file
- file > open > [mri-stack-binary] (IJ:26.4)
make sure that the code looks in the following way:
for (currentStep=0; currentStep<100;currentStep++){ run("Next Slice [>]"); run("Measure"); }
- Question: what is the issue with this approach?
9.4. automatic iteration - introducing function for stop condition
- target: avoid fixed stop condition and exchange it by more accurate mechanism
- continue from last example or open preprocessed file
- file > open > [mri-stack-binary] (IJ:26.4)
make sure that the code looks in the following way:
for (currentStep=1; currentStep<=nSlices();currentStep++){ setSlice(currentStep); run("Measure"); }
9.5. adding macro to the menu
- target: add macro to the menu
- continue from last example or open preprocessed file
- file > open > [mri-stack-binary] (IJ:26.4)
switch to code editor and make sure that the code looks in the following way:
macro "measure stack" { for (currentStep=1; currentStep<=nSlices();currentStep++){ setSlice(currentStep); run("Measure"); } }
- language > ImageJ Macro
- save > .ijm
- plugins > macros > install… (IJ:31.1.1)
- select the macro you just saved
- (optional) test following FIJI tool
- image > stacks > plot z axis profile (IJ:28.6.13)
9.6. iterations and variables in the macro: multi-measurement
- target: prepare the evenly distributed selection over the image v.1 This can be used e.g. in FRAP experiment analysis.
- open : [frap.tif] (IJ:26.2)
test code:
// initialization x = 20; y = 20; // iterations for (nbr_x=0;nbr_x<5;nbr_x++){ for (nbr_y=0;nbr_y<5;nbr_y++){ makePoint(x+x*nbr_x, y+y*nbr_y); run("Enlarge...", "enlarge=5 pixel"); roiManager("Add"); } }
9.7. automatic measurement and saving to a file
- target: prepare the evenly distributed selection over the image v.2
test code:
// initialization roiManager("reset"); x = 220; y = 110; nbr_sensors = 4; delta = 12; // iterations to create selection for (nbr_x=0;nbr_x<nbr_sensors;nbr_x++){ for (nbr_y=0;nbr_y<nbr_sensors;nbr_y++){ makePoint(x+delta*nbr_x, y+delta*nbr_y); run("Enlarge...", "enlarge=5 pixel"); roiManager("Add"); } } // measurement and save results roiManager("Multi Measure"); fn = getInfo("image.filename"); saveAs("Results", "/Users/sstoma/Desktop/Results-"+ fn +".txt"); // exchange previous line with your path
9.8. user input via GUI
- target: prepare the evenly distributed selection over the image v.3
test code:
// initialization roiManager("reset"); x = 20; y = 20; nbr_sensors = 4; delta = 12; // GUI Dialog.create("Please specify parameters:"); Dialog.addNumber("Size [px]: ", 5); Dialog.show(); size = Dialog.getNumber(); // iterations to create selection for (nbr_x=0;nbr_x<nbr_sensors;nbr_x++){ for (nbr_y=0;nbr_y<nbr_sensors;nbr_y++){ makePoint(x+delta*nbr_x, y+delta*nbr_y); run("Enlarge...", "enlarge="+ size +" pixel"); roiManager("Add"); } } // measurement and save results roiManager("Multi Measure"); fn = getInfo("image.filename"); saveAs("Results", "/Users/sstoma/Desktop/Results-"+ fn +".txt"); // exchange previous line with your path
9.9. user input via image window / selection
- target: prepare the evenly distributed selection over the image - add user selected zone of selection and prepare it to work in the batch mode v.4
test code:
// initialization roiManager("reset"); x = 20; y = 20; nbr_sensors = 4; delta = 12; // GUI Dialog.create("Please specify parameters:"); Dialog.addNumber("Size [px]: ", 5); Dialog.show(); size = Dialog.getNumber(); // get the input for location from the image setBatchMode("show"); waitForUser("Draw ROI, then hit OK"); getBoundingRect(x, y, width, height) // iterations to create selection for (nbr_x=0;nbr_x<nbr_sensors;nbr_x++){ for (nbr_y=0;nbr_y<nbr_sensors;nbr_y++){ makePoint(x+delta*nbr_x, y+delta*nbr_y); run("Enlarge...", "enlarge="+ size +" pixel"); roiManager("Add"); } } // measurement and save results roiManager("Multi Measure"); fn = getInfo("image.filename"); saveAs("Results", "/Users/sstoma/Desktop/Results-"+ fn +".txt"); // exchange previous line with your path
9.10. batch mode - basics
- target: Create a macro to segment nuclei in a single frame. Your macro should input a row to the Results containing area for each nuclei in the image. Process all files in the hela folder.
- open : [hela/hela-1.tif] (IJ:26.2)
- plugins > macro > recorder (IJ:31.1.4)
- image > adjust > threshold (IJ:28.2.4)
- select: triangle
- check: dark background
- analyze > analyze particles (IJ:30.2)
make sure that the code looks in the following way:
// processing run("Gaussian Blur...", "sigma=2 stack"); setAutoThreshold("Triangle dark"); run("Convert to Mask"); run("Set Measurements...", "area mean display redirect=None decimal=9"); run("Analyze Particles...", "show=[Overlay Masks] display exclude");
- process > batch > macro
- input: select folder containing [hela-1.tif]-[hela-4.tif]
- output: select folder out in the folder containing [hela-1.tif]-[hela-4.tif]
- click process
modify to save results
// initialization outPath = "/Users/sstoma/Desktop/materials/images/hela/out/"; // exchange previous line with your path // processing run("Gaussian Blur...", "sigma=2 stack"); setAutoThreshold("Triangle dark"); run("Convert to Mask"); run("Set Measurements...", "area mean display redirect=None decimal=9"); run("Analyze Particles...", "show=[Overlay Masks] display exclude"); // saving saveAs("Results", outPath+"Results.txt");
modify the code (target: save each result in separated file):
// initilization fileName = getInfo("image.filename"); outPath = "/Users/sstoma/Desktop/materials/images/hela/out/"; // exchange previous line with your path // Process all images finishing with .tif dir = getDirectory("Choose a Directory where the HeLa tif files are"); dirresults = getDirectory("Choose a Directory where to save results (segmentations)"); list = getFileList(dir); for (imagenumber=0;imagenumber<list.length;imagenumber++) { if (endsWith(list[imagenumber],".tif")){ open(dir+list[imagenumber]); run("Clear Results"); // processing run("Gaussian Blur...", "sigma=2 stack"); setAutoThreshold("Triangle dark"); run("Convert to Mask"); run("Set Measurements...", "area mean display redirect=None decimal=9"); run("Analyze Particles...", "show=[Overlay Masks] display exclude"); // saving saveAs("Results", outPath + "Results-" + fileName + ".txt"); } }
9.11. batch mode - full control on processing files
- target: Create a macro to segment nuclei in a single frame. Your macro should input a row to the Results containing area for each nuclei in the image. Process all files in the hela folder. Do not use the batch execution in FIJI - iterate on files in the folder instead.
- open : [hela/hela-1.tif] (IJ:26.2)
- plugins > macro > recorder (IJ:31.1.4)
- image > adjust > threshold (IJ:28.2.4)
- select: triangle
- check: dark background
- analyze > analyze particles (IJ:30.2)
make sure that the code looks in the following way:
// Process all images finishing with .tif dir = getDirectory("Choose a Directory where the HeLa tif files are"); outPath = getDirectory("Choose a Directory where to save results (segmentations)"); list = getFileList(dir); // in list elements are numbered from 0 for (imagenumber=0;imagenumber<list.length;imagenumber++) { if (endsWith(list[imagenumber],".tif")){ open(dir+list[imagenumber]); run("Clear Results"); // processing run("Gaussian Blur...", "sigma=2 stack"); setAutoThreshold("Triangle dark"); run("Convert to Mask"); run("Set Measurements...", "area mean display redirect=None decimal=9"); run("Analyze Particles...", "show=[Overlay Masks] display exclude"); // saving vfileName = getInfo("image.filename"); saveAs("Results", outPath + "Results-" + fileName + ".txt"); } }
10. workflow: tracking
10.1. create image with moving dots
- target: create an image with moving objects (dots)
make sure that the code looks in the following way:
macro "create_image_with_moving_objects"{ // initial variables nbr_frames = 40; // number of frames in the image color1 = 150; // color of first obj. color2 = 250; // color of sec. obj. canvas_size = 200; // size of the image step = 4; // progress in x between frames delta = 15; // difference in position between two objects in x x = 5; // initial position x of object y = 5; // initial position y of object width = 10; // baseline size of object in x height = 10; // baseline size of object in y // empty image with noise newImage("Image", "8-bit black", canvas_size, canvas_size, nbr_frames); // image will be named "Image" run("Salt and Pepper", "stack"); for(i=1;i<=nbr_frames;i++){ setSlice(i); // first dot setColor(color1,color1,color1); fillOval(x+i*step, y+i*step, width, height); // second dot setColor(color2,color2,color2); fillOval(delta+x+i*step, canvas_size-(y+i*step), width*2, height*2); } run("glasbey"); }
10.2. tracking: process single image
- target: for current frame of the stack find the x, y of the center of the dot
make sure that the code looks in the following way
macro "tracking_process_single_image"{ run("Median...", "radius=2 slice"); setThreshold(0, 100); run("Convert to Mask", "method=Otsu background=Light only"); run("glasbey"); run("Find Maxima...", "noise=25 output=List light"); }
10.3. tracking: process whole stack
- target: for all frames of the stack find the x, y of the center of the dot
make sure that the code looks in the following way:
macro "tracking_process_stack_v1"{ r = newArray(); for (i=1;i<=nSlices();i++){ setSlice(i); run("Median...", "radius=2 slice"); setThreshold(0, 100); run("Convert to Mask", "method=Otsu background=Light only"); run("glasbey"); run("Find Maxima...", "noise=25 output=List light"); run("Next Slice [>]"); // workaround for Find maxima overwriting results at each step for (j=0;j<nResults();j++){ x = getResult("X", j); y = getResult("Y", j); print(x, y, i); temp = newArray(x, y); r = Array.concat(r, temp); } } Array.show( r ); }
10.4. tracking: process whole stack - enabling linking of the objects
- target: for all frames of the stack find the x, y of the center of the dot as well as some object features (i.e. size, mean grey value).
make sure that the code looks in the following way:
macro "tracking_process_stack_v2"{ // clearing previous result and preparing image copy run("Clear Results"); rename("Image"); run("Duplicate...", "duplicate"); rename("orig"); selectWindow("Image"); // iterating for each slice in the stack for (i=1;i<=nSlices();i++){ setSlice(i); run("Median...", "radius=2 slice"); // removing noise setThreshold(0, 100); // hardcoded thr. for image run("Convert to Mask", "method=Otsu background=Light only"); run("glasbey"); // changing LUT to get false collors to better distinguish objects run("Set Measurements...", "area mean standard center median skewness area_fraction stack redirect=orig decimal=2"); run("Analyze Particles...", "display slice"); run("Next Slice [>]"); } }
11. workflow: FRET
11.1. preparation part 1 - image import
- target: open .lif image and prepare it for further editing
- file > open : [FRET_biosensor.lif] (IJ:26.2)
- configure the importer
- disable: all series
- choose 3rd serie
- image > stacks > z project (IJ:28.6.11)
- image > color > split channel (IJ:28.5.1)
- select blue channel (ch0)
- file > save as > tif : cfp.tif (IJ:26.10.1)
- select yellow channel (ch1)
- file > save as > tif : yfp.tif (IJ:26.10.1)
11.2. preparation part 2 - averaging
- target: prepare images for further editing
- file > open : [cfp.tif and yfp.tif] (IJ:26.2)
- select blue channel (cfp.tif)
- process > filters > gaussian blur % sigma ~= 2 (IJ:29.11.2)
- file > save as > tif : cfp-smoothed.tif (IJ:26.10.1)
- select yellow channel (yfp.tif)
- process > filters > gaussian blur % sigma ~= 2 (IJ:29.11.2)
- file > save as > tif : yfp-smoothed.tif (IJ:26.10.1)
11.3. preparation part 3 - masks
target: prepare masks
- file > open : [yfp-smoothed.tif] (IJ:26.2)
- image > adjust > threshold (IJ:28.2.4)
- test different option to isolate chromatine
- file > save as > tif : mask.tif (IJ:26.10.1)
11.4. preparation part 4 - ratios
target: prepare image with ratios
- file > open : [cfp-smoothed.tif and yfp-smoothed.tif] (IJ:26.2)
- process > calculator plus > divide (i1 = yfp, i2 = cfp, k1 = 1, k2 = 0)
- file > save as > tif : ratio.tif (IJ:26.10.1)
11.5. analysis - problem: cell population
target: measure the change of signal in ratio.tif image
- file > open : [ratio.tif] (IJ:26.2)
- analyze > set measurements (IJ:30.7)
- check: mean gray value / standard deviation
- analyze > measure (m) (IJ:29.12.1)
- move to next time point; repeat;…
- image > stacks > plot z axis profile (IJ:28.6.13)
- if does not work: image > hyperstacks > re-order hyperstack
- swap t with z
- if does not work: image > hyperstacks > re-order hyperstack
- question: what is the problem with results?
11.6. preparation part 5 - cropping
target: prepare image with ratios
- file > open : [all previously prepared images] (IJ:26.2)
- choose a cell in transition to anaphase - make sure the field of view keeps only this cell during all time-points
- [palette > rectangular selection] (IJ:19.1)
- edit > selection > add to manager (ctrl-t) (IJ:27.12.22)
- use roi manager to move selection between images
- analyze > tools > ROI manager
- image > crop (IJ:28.8)
- save all files adding “-crop” postfix
11.7. analysis - problem: chromatin change
target: measure the change of signal in ratio-crop.tif image
- file > open : [ratio-crop.tif] (IJ:26.2)
- analyze > set measurements (IJ:30.7)
- check: mean gray value / standard deviation
- analyze > measure (m) (IJ:29.12.1)
- move to next time point; repeat;…
- image > stacks > plot z axis profile (IJ:28.6.13)
- if does not work: image > hyperstacks > re-order hyperstack
- swap t with z
- if does not work: image > hyperstacks > re-order hyperstack
- question: what are the issues with results?
11.8. analysis - problem: manual labor
target: measure the change of signal in ratio-crop.tif image limited to chromatin
- file > open : [mask-crop.tif] (IJ:26.2)
- [palette > wand selection] (IJ:19.7)
- add chromatin from current time-point
- edit > selection > add to manager (ctrl-t) (IJ:27.12.22)
- move to next time-point
- repeat
- file > open : [ratio-crop.tif] (IJ:26.2)
- analyze > set measurements (IJ:30.7)
- check: mean gray value / standard deviation
- select the right ROI; analyze > measure (m) (IJ:29.12.1)
- move to next time point; repeat;…
- question: what are the issues with results?
12. workflow: scratch assay
12.1. part 1
- target: estimate the area occupied by cells in single timepoint
- file > open : [scratch/control-single-frame.tif] (IJ:26.2)
- image > duplicate
- process > filters > gaussiab blur
- sigma: 5
- threshold
- Method: Moments
- Background: Dark
- image > invert
- process > binary > Distance Map
- threshold
- Method: Moments
- Background: Dark
- select original image
- image > type > 8-bit
- image > color > merge channels
- C1: original image (after conversion to 8-bit)
- C4: mask
- Create composite: True
- Keep source images: True
12.2. part 2
- target: estimate the area occupied by cells in each time point (extend part 1 and identify the main problem)
- file > open : [scratch/control.tif] (IJ:26.2)
- repeat steps from part 1 on the stack
12.3. part 3
- target: estimate the area occupied by cells in each time point
- file > open : [scratch/control.tif] (IJ:26.2)
- image > duplicate
- image > process > subtract background
- Radius: 30
- Preview: True
- process > filters > gaussiab blur
- sigma: 5
- threshold
- Method: Moments
- Background: Dark
- image > invert
- process > binary > Distance Map
- threshold
- Method: Moments
- Background: Dark
- select original image
- image > type > 8-bit
- image > color > merge channels
- C1: original image (after conversion to 8-bit)
- C4: mask
- Create composite: True
- Keep source images: True
13. various useful tools
13.1. installing plugins
- download plugin from webpage: http://bigwww.epfl.ch/algorithms/esnake/
- unzip, drag and drop to FIJI
- create new canvas
- draw two white discs on black background
- plugins > ESnake
- target brightness: bright
- click OK
13.2. using line selection to make a “straighten” image
- file > open samples > nile bend (IJ:26.4)
- use selection tool for freehand selection
- make the line thickness adjusted to cover whole river
- edit > selection > straighten (IJ:27.12.17)
13.3. using 3D viewer
- file > open samples > confocal series (IJ:26.4)
- image > properties > voxel depth x10 % to get decent aspect ratio
- plugins > 3D viewer
- add > from image % the resampling factor is a downsampling factor
- play with displayed colors
- view > start/stop animation
- view > change animation settings
- view > record 360 degree rotation
- file > save as > avi % try the different compression options uncompressed, jpg, and png