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. file > open samples > HeLa (IJ:26.2)
  2. image > show info (ctrl-i) (IJ:28.3)
  3. analyze > tools > scale bar (IJ:30.14.6)

1.2. opening the image and basic drawing

  1. target: “convert” [geometry-source.tif] into [geometry-target.tif]
  2. file > open : [geometry-source.tif] (IJ:26.2)
  3. use following tools to convert source into target:
    1. [palete > straight line] (IJ:19.12.1)
      • try shift
    2. [palete > color picker] (IJ:19.11)
      • e.g. choose black as foreground
      • try Draw (d) (IJ:27.9-10)
    3. [palete > flood fill tool] (IJ:19.16)
      • use again: color or picker to choose right color for filling
    4. [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)
    5. [palete > rectangular selection] (IJ:19.1)
      1. select a rectangular shape around blue rectangle
      2. apply Copy (ctrl-c), Paste (ctrl-v)

1.3. image inspection

  1. open the “single_channel.tif” image (drag & drop, or File > Open)
  2. Image > Duplicate (IJ:28.9)
    • shortcut: D (shift-d)
  3. Analyze > Histogram (IJ:30.10)
    • Shortcut: h
  4. click “live”
  5. Image > Adjust > Brightness/Contrast
    1. play with sliders and Auto and Set and Reset
    2. observe histogram window–what is changing, what is not?
    3. click Apply
    4. what changed?

1.4. adjust brightness/contrast of all open images

  1. open three single-channel images, in folder “for_exercise_1.4” (drag & drop, or File > Open)
  2. for all images: Analyze > Histogram (IJ:30.10) (Shortcut: h)
    • click “live”
  3. for one image: Image > Adjust > Brightness/Contrast
  4. adjust contrast with sliders or Auto
  5. click Set
  6. check “Propagate to all other open images”-box
  7. click OK
  8. what happened to the histograms?
  9. what happened to the images?
  10. did pixel values change?
  11. pick another image and repeat steps 4–7
  12. what happened, what is different, is it better/worse?

1.5. copy pasting from image to image

  1. target: create a figure illustrating the difference in C. elegans phenotype (see elegance-fig.tif) based on elegans.tif example
  2. file > new > image (IJ:26.1)
    • Type: 8bit
    • Slices: 1
    • Fill with: black
  3. file > save as > tif : my-elegance-fig.tif (IJ:26.10.1)
  4. [palete > color picker] (IJ:19.11)
    • choose white as foreground and black as background
  5. file > open : [elegance.tif] (IJ:26.2)
  6. 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
  7. 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
  8. 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
  9. file > save (IJ:26.10.1)

1.6. file handling and non-invasive editing

  1. file > open samples > blobs (shift-b) (IJ:26.4)
  2. analyze > tools > scale bar (IJ:30.14.6)
    • set color, background, position
    • check: overlay, bold
  3. 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

  1. file > open : [blobs1.tif] (IJ:26.2)
    • from the previous exercise
  2. image > info (i) (IJ:28.3)
  3. image > overlay > remove overlay (IJ:28.14.7)
  4. analyze > set scale (IJ:30.8)
    • set scale such as image is 100 um long in each dimension
  5. analyze > tools > scale bar (IJ:30.14.6)
    • set color, background, position
    • check: NO overlay
  6. 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

  1. target: verrify that images “looking” alike might be different
  2. file > open samples > blobs (shift-b) (IJ:26.4)
  3. inspect pixel values (IJ:p.28:Toolbar)
  4. image > lookup table > invert LUT (IJ:28.15.1)
  5. change color lookup table
    • Image > Look up table > Fire
  6. analyze > tools > calibration bar (IJ:30.14.7)
  7. file > open > [blobs16bit.tif] (IJ:26.2)
  8. change color lookup table
    • Image > Look up table > Fire
  9. analyze > tools > calibration bar (IJ:30.14.7)

1.9. 8-bit and 16-bit pseudocolor images

  1. file > open samples > blobs (shift-b) (IJ:26.4)
  2. inspect pixel values (IJ:p.28:Toolbar)
  3. image > lookup table > invert LUT (IJ:28.15.1)
  4. analyze > tools > calibration bar (IJ:30.14.7)
  5. file > open > [blobs16bit.tif] (IJ:26.2)
  6. inspect pixel values (IJ:p.28:Toolbar)
    • alternatively use Pixel Inspector (IJ:19.20)
  7. analyze > tools > calibration bar (IJ:30.14.7)
  8. file > open samples > blobs (shift-b) (IJ:26.4)
  9. 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)
  10. add arrow in draw (IJ:19.13)
    • confirm by ctrl-d (IJ:19.8)
  11. 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

  1. file > open samples > blobs (shift-b) (IJ:26.4)
  2. image > duplicate (IJ:28.9)
  3. rename images: left and right
    • image > rename (IJ:28.10)
  4. change color lookup table for left and right
    • Image > Look up table > Fire | green
  5. duplicate both images (IJ:28.9)
    • name them left-1 and right-1
  6. image > stack > tools > combine (IJ:28.6.15.1)
    • select left and right
  7. select left-1
    • image > type > Color RGB (IJ:7)
    • check with picker what are the values in pixels (IJ:p.28:Toolbar)
  8. select left-2
    • image > type > Color RGB (IJ:7)
  9. image > stack > tools > combine (IJ:28.6.15.1)
    • select left-1 and right-1

1.11. color spaces

  1. file > open : [blob-combined.tif] (IJ:26.2)
  2. plugins > Color Inspector 3D
  3. switch “Display mode” to histogram
  4. 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

  1. file > open samples > blobs (shift-b) (IJ:26.4)
  2. image > lookup tables > invert LUT (IJ:28.15.1)
  3. analyze > histogram (IJ:30.10)
    • mark live
  4. select line tool (IJ:19.2) (IJ:p.28:Interface)
  5. analyze > plot profile (IJ:30.11)
    • mark Live
    • move line
    • double click on line icon
    • change line thickness (move line)
  6. edit > selection > select none
  7. 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

  1. file > open samples > M51 galaxy (IJ:26.4)
  2. (2x) image > duplicate (IJ:28.9)
  3. (3x) analyze > histogram (IJ:30.10)
    • mark live
    • check log button
  4. on each image
    • process > enhance contrast (IJ:29.5)
      • normalize checked
    • process > enhance contrast (IJ:29.5)
      • equalize checked
    • process > enhance local contrast (CLAHE)
  5. compare the results

1.14. histogram adjustments

  1. target: familiarize with manual histogram adjustment and HiLo LUT
  2. file > open > [dudes.jpg] (IJ:26.2)
  3. analyze > histogram (IJ:30.10)
    • mark live
  4. image > lookup tables > invert LUT (IJ:28.15.1)
  5. 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)
  6. process > enhance contrast (IJ:29.5)
    • equalize un-checked
    • normalize un-checked
  7. What is happening when saturated pixels is equal to 5%?

1.15. using 16 bit images to increase precision

  1. file > open samples > M51 galaxy (IJ:26.4)
  2. image > lookup tables > fire (IJ:28.15)
  3. image > duplicate (IJ:28.9)
  4. (2x) analyze > histogram (IJ:30.10)
    • mark live
    • check log button
  5. on first image:
    • image > type > 8 bit
    • process > enhance contrast (IJ:29.5)
      • equalize checked
  6. on second image:
    • process > enhance contrast (IJ:29.5)
      • equalize checked
  7. for both img.: image > lookup tables > fire (IJ:28.15)
  8. select center of the galaxy with [palete > rectangular selection] (IJ:19.1)
  9. 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
  10. analyze > set measurements (IJ:30.7)
    • check: mean gray value / standard deviation
  11. for both img.: analyze > measure (m) (IJ:29.12.1)
  12. for both img.: image > lookup tables > glasbey (IJ:28.15)
  13. compare the results

2. working with multichannel images

2.1. create new image

  1. target: create a sketch of a cell as in [cell.tif]
  2. file > new > image (IJ:26.1)
    • Type: 8bit
    • Slices: 2
    • Fill with: black
  3. [palete > brush] (IJ:19.4)
    • right click on the [palete > brush]
      • uncheck: “Paint in overlay”
  4. [palete > color picker] (IJ:19.11)
    • choose red as foreground
  5. Draw an outline of a cell ;)
  6. image > color > channel tool (ctrl-z) (IJ:28.5.3)
    • make composite (IJ:28.5.5)
  7. Switch a slice with a slider
  8. [palete > color picker] (IJ:19.11)
    • choose blue as foreground
  9. Draw cell nuclei
  10. [palete > brush] (IJ:19.4)
    • right click on the [palete > brush]
      • check: “Paint in overlay”
  11. [palete > color picker] (IJ:19.11)
    • choose blue as foreground
  12. Draw cell vesicles
  13. 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
  14. image > color > channel tool (ctrl-z) (IJ:28.5.3)
    • switch between composite | color | grey
  15. file > save as > tif : my-cell.tif (IJ:26.10.1)

2.2. composite images - splitting and merging

  1. file > open samples > fluorescent cells (IJ:26.4)
  2. image > color > arrange channels
    • click on New 1, and select magenta
  3. image > color > split channels (IJ:28.5.1)
  4. merge channels to composite
    • image > color > merge channels (IJ:28.5.2)
    • check “create composite” box (IJ:28.5.2)
  5. LUT
    • change LUT of the channels (LUT in the “startup tools”)
  6. 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

  1. file > open samples > neuron (IJ:26.4)
  2. image > color > channel tool (IJ:28.7.5)
  3. 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
  4. 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)

  1. open : [mitosis-mixedStack.tif] (IJ:26.2)
  2. image > hyperstacks > reorder hyperstacks
    • swap z with t (it is to overcome issues with make montages)
  3. image > stacks > tools > make substack (IJ:28.6.15.7)
    • choose only one z slice e.g. 3rd one
  4. image > duplicate (IJ:28.9)
    • check duplicate hyperstack
  5. image > color > channels tool (shift-z) (IJ:28.7.5)
    • split channels (IJ:28.5.1)
  6. for both C1 and C2 images
    • choose LUT Fire (IJ:19.7)
    • create channel label (IJ:19.8)
    • image > type > color RGB (IJ:7)
  7. for original two channel image
    • image > type > color RGB (IJ:7)
  8. image > stacks > tools > combine (IJ:28.6.15.1)
    • choose left: 2 channel image
    • choose right: C1
  9. image > stacks > tools > combine (IJ:28.6.15.1)
    • choose left: merged image
    • choose right: C2
  10. image > stacks > series labeler
    • select time and other options; use preview to peek
  11. file > save as > avi (IJ:26.10.1)
    • e.g. 10 frames per sec.
  12. image > stacks > make montage (IJ:28.6.8)
    • play with settings:
      • columns 1
      • rows 5
      • increments 12
  13. 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).

  1. file > open samples > blobs (IJ:26.4)
  2. image > lookup table > invert LUT (IJ:28.15.1)
  3. image > duplicate (IJ:28.9)
  4. image > adjust > threshold (IJ:28.2.4)
    • set up sliders and Dark background checkbox and threshold the image:
    • use 126 value as threshold
  5. note: pixel values are altered
  6. (optional) image > adjust > auto threshold

3.2. basic concept of filtering: binary filters

goal: see different binary operations in action

  1. open : [blobs-thr.tif] (IJ:26.2)
  2. image > duplicate (IJ:28.9)
  3. process > binary > watershed (IJ:29.8.12)
  4. process > noise > remove outliers (IJ:29.6.5)
    • check preview
    • list bright
  5. (process > find maxima) (IJ:29.4)
  6. (2x) process > binary > erode (IJ:29.8.3)
  7. process > find edges (IJ:29.3)
  8. process > binary > fill holes (IJ:29.8.8)

3.3. basic concept of filters: sharpen

  1. file > open samples > hela cells (IJ:26.4)
  2. 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

  1. open vertical_stripes.tif
  2. duplicate the vertical_stripes.tif original image
    • Image > Duplicate (shortcut: shift-d) (IJ:28.9)
  3. 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?
  4. duplicate the vertical_stripes.tif original image
  5. 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

  1. open horizontal_stripes.tif
  2. duplicate the horizontal_stripes.tif original image
    • Image > Duplicate (shortcut: shift-d) (IJ:28.9)
  3. 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?
  4. duplicate the horizontal_stripes.tif original image
  5. 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

  1. open checkerboard.tif
  2. duplicate the checkerboard.tif original image
    • Image > Duplicate (shortcut: shift-d) (IJ:28.9)
  3. 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?
  4. duplicate the checkerboard.tif original image
  5. 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

  1. Open image exercise_morphology.tif
  2. duplicate the image 4 times and name each copy as following
    • Eroded
    • Dilated
    • Closed
    • Opened
  3. 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.
  4. Report findings

3.8. Morphological filters - Gray

  1. Open image exercise_morphology.tif
  2. Apply Gray Morphological filters:
    • Process > Morphology > Gray Morphology
  3. Apply Image opening with circular structuring element with radius 3 - removes noise
  4. Report: did it get rid of the noise?
  5. Apply Image opening with circular structuring element with radius 5
  6. Report: did it get rid of the tentacles from the top-left object?
  7. With the line tool, measure the diameter of the holes in the bottom-right object.
  8. Apply Image closing with circular structuring element with radius slightly larger than the radius
  9. Report: did it get rid of the tentacles from the top-left circle?

3.9. basics mathematical operations on single image

  1. open : [f2.tif] (IJ:26.2)
  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

  1. target: Perform consecutive addition and subtraction of the same value from an image. Compare the results with original image.
  2. open : [spooked_16bit.tif] (IJ:29.9.1)
  3. image > duplicate (IJ:28.9)
    • work on the copy
  4. process > math > add (IJ:29.9.1)
    • add value: 600
  5. process > math > subtract (IJ:29.9.2)
    • subtract value: 600
  6. comapare the original and the copy: are they the same? What has happened?

3.11. basics mathematical operations on two images

  1. open : [f2.tif] and [f1.tif] (IJ:26.2)
  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

  1. file > open : [tulip.tif] (IJ:26.2)
  2. image > duplicate (IJ:28.9)
    • work on the copy
  3. file > save as > jpg (IJ:26.10.3)
    • tulip.jpg
  4. [palete > pencil ] (IJ:19.19)
    • modify value of only one pixel
  5. file > save as > jpg (IJ:26.10.3)
    • tulip-1px.jpg
  6. close all jpeg files and reopen them
  7. process > calculator (IJ:29.13)
    • image1: tulip.tif
    • operation: subtract
    • image2: tulip.jpg
    • checked: create new window
    • checked: 32 bit result
  8. process > calculator (IJ:29.13)
    • image1: tulip-1px.jpg
    • operation: subtract
    • image2: tulip.jpg
    • checked: create new window
    • checked: 32 bit result
  9. 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

  1. 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.
  2. file > open : [xxx.tif] (IJ:26.2)
  3. file > open : [xxx_background.tif] (IJ:26.2)
  4. process > calculator (IJ:29.13)
    • image1: xxx.tif
    • operation: subtract
    • image2: xxx_background.tif
    • checked: create new window
    • checked: 32 bit result
  5. process > calculator (IJ:29.13)
    • image1: xxx.tif
    • operation: subtract
    • image2: xxx_background.tif
    • checked: create new window
    • unchecked: 32 bit result
  6. question: what is the reason of posterization ?

4.2. background elimination - flat field correction

  1. file > open > cell colony (IJ:26.4)
  2. use selection to draw a horizontal line across the image (IJ:19.2)
  3. analyze > plot profile
    • check live
  4. 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

  1. file > open samples > cell colony (IJ:26.4)
  2. image > duplicate (IJ:28.9)
  3. process > filters > gaussian blur % sigma ~= 30 (IJ:29.11.2)
  4. measure mean of blurred image (select it, “a”, “m”) (IJ:29.12.1)
  5. 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

  1. task : measure average flu. in Red channel in neuron
  2. file > open samples > neuron (IJ:26.4)
  3. image > color > channel tool (IJ:28.7.5)
    • split channels (IJ:28.5.1)
  4. close all but green and red
  5. 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)
  6. 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)
  7. analyze > set measurements (IJ:30.7)
    • check: area / area fraction / mean gray value
  8. 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)
  9. for each selection
    • analyze > measure (m) (IJ:29.12.1)
  10. roi manager > more > save selection (IJ:30.14.5)

5.2. measuring geometrical properties in the image

  1. task : measure average flu. in Red channel in neuron
  2. file > open samples > neuron (IJ:26.4)
  3. 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)
  4. 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)
  5. 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)
  6. roi manager > more > save selection (IJ:30.14.5)

6. automatic measurements

6.1. identifying and measuring objects - basics

  1. open : [blobs-thr.tif] (IJ:26.2)
  2. image > duplicate (IJ:28.9)
  3. process > binary > watershed (IJ:29.8.12)
  4. process > noise > remove outliers (IJ:29.6.5)
    • check preview
  5. analyze > set measurements (IJ:30.7)
    • check: area / area fraction / mean gray value
  6. analyze > analyze particles (IJ:30.2)
    • test different options

6.2. identifying and measuring objects - cells #1

  1. target: measure distribution of RFP signal inside nucleus across cell population
  2. open : [hela1.tif] (IJ:26.2)
  3. image > adjust > threshold (IJ:28.2.4)
    • test different option to isolate cells
  4. question: What are the difficulties?

6.3. identifying and measuring objects - cells #2

  1. target: measure distribution of RFP signal inside nucleus across cell population
  2. open : [hela2.tif] (IJ:26.2)
  3. image > color > split channel (IJ:28.5.1)
  4. 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
  5. analyze > set measurements (IJ:30.7)
    • check: area / area fraction / mean gray value
    • redirect to: RFP
  6. analyze > analyze particles (IJ:30.2)
  7. analyze > distribution (IJ:30.4)
    • choose: gray value

7. Segmentation

7.1. DAPI segmentation with thresholding

  1. open DAPI.tif (single-channel image)
  2. change LUT to Grays
  3. Image > Adjust > Threshold
  4. understand the function of the Dark Background checkbox (inspect pixel values)
  5. try setting sliders manually
  6. try different algorithms
    • Image > Adjust > Auto Threshold, if you want to see all at the same time
  7. try different display options (Red, B&W, Over/Under)—do you understand what they show
  8. when happy with result, click Apply
  9. save the resulting binary image (File > Save As > Tiff... )
  10. Apply watershed to divide touching objects
    • select the binary image
    • Process > Binary > Watershed
  11. proceed with Analyze > Analyze Particles
    • select Exclude on edges and Add to Manager
    • click on OK
  12. Bonus: repeat step 11 but use the Size and Circularity options to try to exclude some particles and the Show dropdown menu to visualize different outputs.
  13. Set the parameters you want to measure:
    • Analyze > Set measurement
    • select Area, Mean gray value, Min & max gray value, Display label
    • click on OK
  14. Select the original image (open it again as in step 1 if you do not have it)
  15. In the ROI Manager, click on Deselect and then on Measure
  16. Save the Results table as .csv (select the table and click on File > Save As…)

7.2. DAPI segmentation with filters and thresholding

  1. open DAPI_noise.tif
  2. change LUT to Grays
  3. Image > Adjust > Threshold
  4. understand the function of the Dark Background checkbox (inspect pixel values)
  5. try setting sliders manually. Can you find a good threshold range?
  6. 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
  7. duplicate the DAPI_noise.tif image
    • Image > Duplicate (shortcut: shift-d) (IJ:28.9)
  8. 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
  9. now perform steps 5 and 6 again
  10. repeat steps 8, 5 and 6 until happy with result, then click Apply
  11. save the resulting binary image (File > Save As > Tiff... )
  12. Apply watershed to divide touching objects
    • select the binary image
    • Process > Binary > Watershed
  13. proceed with Analyze > Analyze Particles
    • select Exclude on edges and Add to Manager
    • click on OK
  14. Bonus: repeat step 11 but use the Size and Circularity options to try to exclude some particles and the Show dropdown menu to visualize different outputs.
  15. Set the parameters you want to measure:
    • Analyze > Set measurement
    • select Area, Mean gray value, Min & max gray value, Display label
    • click on OK
  16. Select the original image (open it again as in step 1 if you do not have it)
  17. In the ROI Manager, click on Deselect and then on Measure
  18. Save the Results table as .csv (select the table and click on File > Save As…)

7.3. DAPI segmentation with Weka

  1. open hela-1.tif (single-channel image)
  2. change LUT to Grays
  3. Plugins > Segmentation > Trainable Weka Segmentation
  4. draw a line outside a nucleus
  5. click Add to class 1
  6. draw a line inside a nucleus
  7. click Add to class 2
  8. click Train classifier
  9. repeat the last four steps until happy with result
  10. click Get probability
  11. inspect the probability maps, do you understand the meaning of the values of the pixels in the different channels?
  12. click Create result
  13. inspect results, do you understand the meaning of the values of the pixels in the different channels?
    1. you now have a binary image, but not the kind Fiji likes
    2. to measure, proceed by thresholding (“set” both threshold values to 1), then Analyze Particles, etc
    3. alternatively, multiply all values in the Weka output image by 255, then apply Binarize, etc
  14. save the resulting image (File > Save As > Tiff... ) with name “myWekaHeLa1.tif”
  15. Bonus round: play with Settings

7.4. DAPI double-segmentation with Weka

  1. open hela-1.tif (single-channel image)
  2. change LUT to Grays
  3. Process > Enhance Contrast > Histogram Equalization
  4. Plugins > Segmentation > Trainable Weka Segmentation
  5. draw a line outside the cells
  6. click Add to class 1
  7. draw a line inside a nucleus
  8. click Add to class 2
  9. draw a line inside the cytoplams
  10. click Add to class 3
  11. click Train classifier
  12. repeat the last six steps until happy with result
  13. inspect the probability maps, do you understand the meaning of the values of the pixels in the different channels?
  14. click Create result
  15. 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)
  16. Bonus round: play with Settings

7.5. DAPI segmentation with StarDist

  1. Follow StarDist installation instructions from here
  2. open hela-1.tif (single-channel image)
  3. change LUT to Grays
  4. Plugins > StarDist > StarDist 2D
  5. Model: Versatile (fluorescent nuclei)
  6. click OK and wait
  7. after result shows
    • select original image
    • select ROI Manager
    • check the Show All box
  8. comment on the result, is it good/bad?

7.6. H&E segmentation with StarDist

  1. open H&E_retina.jpg (RGB image)
  2. Plugins > StarDist > StarDist 2D
  3. Model: Versatile (H&E nuclei)
  4. click OK and wait
  5. after result shows
    • select original image
    • select ROI Manager
    • check the Show All box
  6. comment on the result, is it good/bad?
  7. duplicate original image
  8. re-scale it by factor of 0.5 in x and y (Image > Scale)
  9. apply StarDist again and overlay the ROIs as above
  10. is there a difference? why?

8. Spot detection

8.1. manual spot detection with the Multi-point Tool (IJ:19.6)

  1. read all the next steps before beginning
  2. open spot_detection/beads_001.tif
  3. right-click (ctrl-click) on the Point Tool in the tool bar and select Multi Tool
  4. double-click on the Point Tool in the tool-bar and customize to your liking (test on image, clear points by shift-a)
  5. count all beads by clicking on them one by one
  6. how long did it take you to click on all the beads (measure with stopwatch the time it took to complete the previous step)?
  7. save results to the ROI Manager (t) then to file (More >> Save …)
  8. click measure in the ROI Manager to get number of spots

8.2. algorithmic spot detection with Find Maxima (IJ:29.4)

Forum post about Find Maxima

  1. open spot_detection/beads_001.tif
  2. Process > Find Maxima ...
  3. check Preview point selection
  4. try different values for Prominence and the three check-boxes
  5. 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
  6. add you detected maxima (Point Selection) to the ROI Manager and save to file
  7. 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

  1. open spot_detection/beads_001.tif
  2. Image > Adjust > Threshold ...
    • select Otsu, then apply
  3. Analyze > Set Measurements ...

    + [X] Area
    + [X] Mean gray value
    + [X] Display label
    
  4. Analyze > Analyze Particles ...

    + Show: Overlay Masks
    + [X] Display results
    + [X] Clear Results
    + [X] Summarize
    + [X] Add to Manager
    
  5. save ROIs to file
  6. Compare results to the previous two approaches
    • Do they differ significantly from each other?
    • Which performed better?

8.4. spot detection with noise

  1. Repeat 8.2 with with_noise_8000.tif
    • consider smoothing the image first:
      • Process > Smooth (this is a 3x3 mean filter)
  2. Repeat 8.3 with with_noise_8000.tif
    • consider smoothing the image first:
      • Process > Filters
      • then pick one
  3. 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

  1. Repeat 8.2 with beads_001_ramp.tif
  2. Repeat 8.3 with beads_001_ramp.tif
  3. Compare and comment on the performance of the two methods
    • Which one is better?
    • Why/how is it better?
  4. What could be done to the image to make thresholding work better?

9. scripting / macros / automation basics

9.1. macro recorder - reproducing edits

  1. target: save the edit chain for later (to save work and to document parameters used by different filters)
  2. plugins > macro > recorder (IJ:31.1.4)
  3. file > open samples > mri-stack (IJ:26.4)
  4. process > filters > gaussian blur with sigma ~= 2 (IJ:29.11.2)
  5. 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
  6. process > binary > fill holes (IJ:29.8.8)
  7. (optional) use analyze > set scale to calibrate the measurement units
    • 200 pixels is 25 cm
  8. Question: What are the benefits of storing such a macro?

9.2. macro recorder - repeating actions on stack

  1. target: calculate the volume of human skull
  2. file > open samples > mri-stack (IJ:26.4)
    • use steps below or macro developed in previous excercise
  3. process > filters > gaussian blur % sigma ~= 2 (IJ:29.11.2)
  4. image > adjust > threshold (IJ:28.2.4)
    • select manually threshold such as the head is separated from background
      • ignore small holes
  5. process > binary > fill holes (IJ:29.8.8)
  6. (optional) use set scale to calibrate the measurement units
    • 200 pixels is 25 cm
  7. plugins > macro > recorder (IJ:31.1.4)
  8. analyse > measure (IJ:29.12.1)
  9. image > stacks > next slice (IJ:28.6.3)
  10. in recorder click create button
  11. 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");
    
  12. Question: how to compute volume of human skull based on the measurement?

9.3. automatic iteration

  1. target: avoid copy pasting - use iteration instead
  2. continue from last example or open preprocessed file
    • file > open > [mri-stack-binary] (IJ:26.4)
  3. make sure that the code looks in the following way:

    for (currentStep=0; currentStep<100;currentStep++){
      run("Next Slice [>]");
      run("Measure");
    }
    
  4. Question: what is the issue with this approach?

9.4. automatic iteration - introducing function for stop condition

  1. target: avoid fixed stop condition and exchange it by more accurate mechanism
  2. continue from last example or open preprocessed file
    • file > open > [mri-stack-binary] (IJ:26.4)
  3. 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

  1. target: add macro to the menu
  2. continue from last example or open preprocessed file
    • file > open > [mri-stack-binary] (IJ:26.4)
  3. 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");
      }
    }
    
  4. language > ImageJ Macro
  5. save > .ijm
  6. plugins > macros > install… (IJ:31.1.1)
    • select the macro you just saved
  7. (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

  1. target: prepare the evenly distributed selection over the image v.1 This can be used e.g. in FRAP experiment analysis.
  2. open : [frap.tif] (IJ:26.2)
  3. 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

  1. target: prepare the evenly distributed selection over the image v.2
  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

  1. target: prepare the evenly distributed selection over the image v.3
  2. 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

  1. 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
  2. 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

  1. 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.
  2. open : [hela/hela-1.tif] (IJ:26.2)
  3. plugins > macro > recorder (IJ:31.1.4)
  4. image > adjust > threshold (IJ:28.2.4)
    • select: triangle
    • check: dark background
  5. analyze > analyze particles (IJ:30.2)
  6. 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");
    
  7. 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]
  8. click process
  9. 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");
    
  10. 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

  1. 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.
  2. open : [hela/hela-1.tif] (IJ:26.2)
  3. plugins > macro > recorder (IJ:31.1.4)
  4. image > adjust > threshold (IJ:28.2.4)
    • select: triangle
    • check: dark background
  5. analyze > analyze particles (IJ:30.2)
  6. 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

  1. target: create an image with moving objects (dots)
  2. 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

  1. target: for current frame of the stack find the x, y of the center of the dot
  2. 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

  1. target: for all frames of the stack find the x, y of the center of the dot
  2. 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

  1. 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).
  2. 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

  1. target: open .lif image and prepare it for further editing
  2. file > open : [FRET_biosensor.lif] (IJ:26.2)
    • configure the importer
    • disable: all series
  3. choose 3rd serie
  4. image > stacks > z project (IJ:28.6.11)
  5. image > color > split channel (IJ:28.5.1)
  6. select blue channel (ch0)
    • file > save as > tif : cfp.tif (IJ:26.10.1)
  7. select yellow channel (ch1)
    • file > save as > tif : yfp.tif (IJ:26.10.1)

11.2. preparation part 2 - averaging

  1. target: prepare images for further editing
  2. file > open : [cfp.tif and yfp.tif] (IJ:26.2)
  3. 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)
  4. 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

  1. file > open : [yfp-smoothed.tif] (IJ:26.2)
  2. image > adjust > threshold (IJ:28.2.4)
    1. test different option to isolate chromatine
  3. file > save as > tif : mask.tif (IJ:26.10.1)

11.4. preparation part 4 - ratios

target: prepare image with ratios

  1. file > open : [cfp-smoothed.tif and yfp-smoothed.tif] (IJ:26.2)
  2. process > calculator plus > divide (i1 = yfp, i2 = cfp, k1 = 1, k2 = 0)
  3. 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

  1. file > open : [ratio.tif] (IJ:26.2)
  2. analyze > set measurements (IJ:30.7)
    • check: mean gray value / standard deviation
  3. analyze > measure (m) (IJ:29.12.1)
  4. move to next time point; repeat;…
  5. image > stacks > plot z axis profile (IJ:28.6.13)
    • if does not work: image > hyperstacks > re-order hyperstack
      • swap t with z
  6. question: what is the problem with results?

11.6. preparation part 5 - cropping

target: prepare image with ratios

  1. file > open : [all previously prepared images] (IJ:26.2)
  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
  3. image > crop (IJ:28.8)
  4. save all files adding “-crop” postfix

11.7. analysis - problem: chromatin change

target: measure the change of signal in ratio-crop.tif image

  1. file > open : [ratio-crop.tif] (IJ:26.2)
  2. analyze > set measurements (IJ:30.7)
    • check: mean gray value / standard deviation
  3. analyze > measure (m) (IJ:29.12.1)
  4. move to next time point; repeat;…
  5. image > stacks > plot z axis profile (IJ:28.6.13)
    • if does not work: image > hyperstacks > re-order hyperstack
      • swap t with z
  6. 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

  1. file > open : [mask-crop.tif] (IJ:26.2)
  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
  3. file > open : [ratio-crop.tif] (IJ:26.2)
  4. analyze > set measurements (IJ:30.7)
    • check: mean gray value / standard deviation
  5. select the right ROI; analyze > measure (m) (IJ:29.12.1)
  6. move to next time point; repeat;…
  7. question: what are the issues with results?

12. workflow: scratch assay

12.1. part 1

  1. target: estimate the area occupied by cells in single timepoint
  2. file > open : [scratch/control-single-frame.tif] (IJ:26.2)
  3. image > duplicate
  4. process > filters > gaussiab blur
    1. sigma: 5
  5. threshold
    1. Method: Moments
    2. Background: Dark
  6. image > invert
  7. process > binary > Distance Map
  8. threshold
    1. Method: Moments
    2. Background: Dark
  9. select original image
  10. image > type > 8-bit
  11. image > color > merge channels
    1. C1: original image (after conversion to 8-bit)
    2. C4: mask
    3. Create composite: True
    4. Keep source images: True

12.2. part 2

  1. target: estimate the area occupied by cells in each time point (extend part 1 and identify the main problem)
  2. file > open : [scratch/control.tif] (IJ:26.2)
  3. repeat steps from part 1 on the stack

12.3. part 3

  1. target: estimate the area occupied by cells in each time point
  2. file > open : [scratch/control.tif] (IJ:26.2)
  3. image > duplicate
  4. image > process > subtract background
    1. Radius: 30
    2. Preview: True
  5. process > filters > gaussiab blur
    1. sigma: 5
  6. threshold
    1. Method: Moments
    2. Background: Dark
  7. image > invert
  8. process > binary > Distance Map
  9. threshold
    1. Method: Moments
    2. Background: Dark
  10. select original image
  11. image > type > 8-bit
  12. image > color > merge channels
    1. C1: original image (after conversion to 8-bit)
    2. C4: mask
    3. Create composite: True
    4. Keep source images: True

13. various useful tools

13.1. installing plugins

  1. download plugin from webpage: http://bigwww.epfl.ch/algorithms/esnake/
  2. unzip, drag and drop to FIJI
  3. create new canvas
  4. draw two white discs on black background
  5. plugins > ESnake
    • target brightness: bright
  6. click OK

13.2. using line selection to make a “straighten” image

  1. file > open samples > nile bend (IJ:26.4)
  2. use selection tool for freehand selection
    • make the line thickness adjusted to cover whole river
  3. edit > selection > straighten (IJ:27.12.17)

13.3. using 3D viewer

  1. file > open samples > confocal series (IJ:26.4)
  2. image > properties > voxel depth x10 % to get decent aspect ratio
  3. plugins > 3D viewer
  4. add > from image % the resampling factor is a downsampling factor
  5. play with displayed colors
  6. view > start/stop animation
  7. view > change animation settings
  8. view > record 360 degree rotation
  9. file > save as > avi % try the different compression options uncompressed, jpg, and png

Author: Federico Gasparoli, Szymon Stoma Simon F. Nørrelykke

Email: simon@hms.harvard.edu

Created: 2024-10-10 Thu 12:54

Validate