Friday, February 14, 2020

3D Imaging and Modeling

*** This course still has spaces!! ***
*** Just send me an email or come to the first class meeting if you are interested!

300530 UE  Imaging and visualization in developmental biology - Principles and applications, including 3D Methods [Summer Semester only] 

300416 UE Imaging and Modeling Using MicroCT (formerly PP)  [Winter Semester only]

Class will meet weekly on Thursdays 14:30-16:00 in the Theoretical Biology Seminar Room (UZA I, Ebene 2, Spange 4).  

First class meeting is Thur. 5 Mar 2020.

Dr. Brian Metscher
Senior Scientist
Dept. of Theoretical Biology

Tel. 1 4277 56704

Topics will include optical and other modalities of microscopic visualization, digital imaging, and 3D methods and analysis, with particular emphasis on x-ray microtomography (microCT) and a variety of applications.

Additional topics may be covered according to students' interests.

The UE is a companion course and prerequisite to the Project Practicum (UE 300416) on microCT imaging. You may take the UE course at the same time as the PP. (You also may take the UE without the PP.)

Evaluation is based on attendance and participation (2/3), and homework (1/3). Attendance is required: two absences (excused or unexcused) will be allowed before your grade is affected.

There will be weekly homework assignments, some of which will include a written assignment to be collected in class; others will include in-class discussion or presentation. These will account for 1/3 of the final mark.

If you are enrolled but cannot attend the first class, you must send me an email about this before the first class. Include your registered name and Matrikelnr.

Monday, June 17, 2019

19 June: 3D printing

We will work with 3D printing this week.
First, look at the three stages of 3D printing:  

Then look over the first two websites below (you don't have to read everything on the pages), and answer the following questions:
  1. What is CAD?
  2. What is STL format?
  3. What is "slicing" for?
  4. What would you have to do to an image stack (e.g. from a CT scan) in order to 3D print a model from it (just the general steps)?
  5. What is fused filament fabrication? ( )
  6. Bring ideas for things you might like to 3D print.
A nice introduction to 3D printing:
"STL File Format (3D Printing) – Simply Explained"
Good explanation, with links to lists of software and sites for downloading STL files:

Some free CAD software:  (browser-based and kinderleicht)

Lots of 3D-printable things, some of which are quite cool:

Wednesday, June 12, 2019

12 June: more Drishti, Amira

We will work more with Drishti today, and an introduction to segmentation with Amira.

Tuesday, June 4, 2019

5 June: In-class work with Drishti or Amira

This week we will work with 3D software in class. You can bring your own laptop if you want to work on it, but we have enough desktop workstations for 4-5 groups to work at the same time.

You can find a few sample image stacks here, if you want to try Drishti on your own:

23 Nov.: More on resolution, Drishti intro

1)  Download this image and open it in Fiji:

Zoom in on the image until you can see the limits of its resolution, i.e. until the smallest discernible objects start to look blurry. 
Now go to Edit => Options => Appearance...  and uncheck "Interpolate zoomed images" and click OK. (This changes only how the image is displayed, not the image data itself.)
Now what are you seeing in the displayed image?

How many pixels are needed to resolve the spaces between the membranes inside the mitochondrion (the mitochondrial cristae)?  

Now go to Image => Scale... and try to down-sample the image until you can no longer see the intermembrane spaces.

2) Watch these two intro videos about Drishti:

Import and render:

Histograms/transfer function:

On Wednesday we will have an introduction to Drishti by Mag. Stephan Handschuh (VetMedUni Wien).

You can download the Drishti software at

Try it if you can. You may use the computers in our department if you like.  

Friday, May 24, 2019

29 May: Drishti is cool

This week we will have the remaining presentations. Also start looking at Drishti:

Download Drishti from Github (just choose the version according to your operating system):

Here are some instruction videos covering the basics we will discuss in class:

Useful tips/wikis/... about Drishti: (basic instructions if you prefer reading to watching videos) (Wiki) (paper by Ajay Limaye) (Drishti cheat)

Monday, April 29, 2019

For 8 May: Intro to tomography and microCT

For next week's class, please read a little about microCT imaging and some applications:

First, read the seminal report on CT:
Hounsfield GN. 1973. Computerized transverse axial scanning (tomography). 1. Description of system. Br J Radiol 46(552): 1016-22.

Read the first 2 pages of this article, with some of the first clinical CT pictures:

In these two articles of mine, you can just read the introductions and look at the pictures :)
Metscher BD. 2013. Biological applications of X-ray microtomography: imaging micro-anatomy, molecular expression and organismal diversity.  Microscopy and Analysis 27(2): 13-16.

Metscher BD. 2009. MicroCT for comparative morphology: simple staining methods allow high-contrast 3D imaging of diverse non-mineralized tissues. BMC Physiology 9:11.

And then watch this short video about tomographic reconstruction:

(The "little mathematical trick" is a filtering operation that makes the resolution and brightness in the cross sections even from the center outwards.)

For homework, answer the following questions:

1. What was the resolution limit on the scans described in 1973? (Estimate pixel size in the slices: start by guessing the size of the patient's head.)
2. How did Hounsfield and Ambrose make tumors and brain lesions more visible in X-ray images?
3. How is the scale of X-ray attenuation values used in this report different from the current Hounsfield scale? [ ]
4. Why is tomography more sensitive (better able to discriminate absorption values) than radiography?
5. What is backprojection?

Tuesday, April 9, 2019

10 April: X-ray imaging and more with Fiji

1) For next class, go through this online tutorial:

and read a little bit about projection images (just understand the diagrams):

   Open this image in Fiji (ImageJ): PCP4_human_cerebellum_40X.tif 
(But remember Rule #0 of image processing : always work on a copy!)
a)  How big is the file when open in Fiji? How big is the file stored on your disk? How do you explain the difference? 
b) What is the pixel size for this image? [Image => Show Info...  or just hit "I"]  Using Image => Properties... set the correct pixel size in µm (use "um" for the units - Fiji will translate that to µm). [Hint: measure the scale bar]
Now, using the line tool in Fiji, measure the approximate thickness of the molecular layer of the cerebellum.

c) Now open PCP4_human_cerebellum_100X.tif and PCP4_human_cerebellum_200X.tif. Given that these photos were made with the same microscope and camera setup, what are their pixel sizes? Enter it using the Image => Properties... dialog, and then measure the longest diameter of the largest Purkinje cell body (brown) in the 200X image. Now, under Analyze => Tools => Scale bar... make a scale bar for this picture. 

Friday, March 29, 2019

3 April: Light microscopy

We will do some practical work with microscopes, and with making digital images.

Review magnification and microscopes in Microscope Basics and Beyond

especially pages 5-9, 26-34, on Koehler illumination, numerical aperture, and resolution. 

This information is also in web pages and tutorials at
sections on Microscope Illumination and Köhler Illumination.
Why is Koehler illumination important?
What is the practical limit of resolution for a compound microscope (in terms of size and objects that are resolvable)?
What is numerical aperture, and how is it important in the performance of a microscope?
What is immersion oil for?

Also read about fluorescence microscopy:
What is meant by "Stokes shift?"
Why is the excitation wavelength (almost) always shorter than the emission wavelength?

Friday, March 22, 2019

For 27 Mar: resolution, spatial frequency

We will start working with the following important concepts, so look at the reading/looking/viewing assignment for each one.

Image resolution:

Spatial frequency:

Fourier decomposition (representing an image in terms of its spatial frequency components):

And finally, point spread function of an imaging system (how much it messes up the image of each single point in the image):

1) How would you simulate the effect of a point spread function on an image using Fiji?
(Hint: use the tool  Process -> Filters -> Convolve... and type in the pixel values for the psf; or copy and paste this one: .
To see the psf as an image, you can also open this text file as an image in Fiji with File -> Import ->  Text image... )

Greg's Thoughts: Albert Einstein/Marilyn Monroe Vision Test
2) This really stupid "vision test," as seen on Facebook and other equally reputable forums, is a hybrid picture of Albert Einstein and Marilyn Monroe. A better version of the image is at (where they also spelled her name wrong).

Explain this "illusion" in terms of spatial frequencies in the images.

3) How would you make such a hybrid image using Fiji?
(Hint: use the tool  Process -> FFT -> Bandpass Filter... ) (FFT = fast Fourier transform, which is a computational method for decomposing an image into its spatial frequency components.)
Optional (but fun): try to find two images that are oriented similarly and make your own hybrid image.

Friday, March 15, 2019

20 Mar: Image formats, Fiji

A pdf with the slides I used in the first two classes can be found here:

For next week's class:

1) Find out about the following (2D) image formats: BMP, GIF, PNG, JPEG, TIFF, raw, and SVG.
Here are some helpful links:
(look at the image examples),  and; (just read the "Overview" section); 
and look at

What is compression, and which formats use it? 
What are the essential differences between raster (pixel) formats and vector graphics?
How big is the file containing a picture taken with a 10 megapixel camera, if it is stored as an RGB TIFF?

2) Try using Fiji (is just ImageJ):

You don't have to do all of the following, just try out some things with Fiji.

You are welcome to use the computers in our department if you don't have Fiji yourself.
a) Open an image (any picture you like; there are samples under File → Open Samples..., or you may be able to find a picture of some kind on the internet), and try some of the basic functions.  Under the Image menu, experiment with the functions in the Type, Adjust, and Lookup Tables menus.

You might find the online documentation helpful:

A useful guide:

Some things to try:

Look the image histogram (under Analyze → Histogram)
Image → Adjust  → Brightness/Contrast...
               "             → Window/Level...
               "             → Color Balance...
               "             → Threshold...

Image → Show Info...
     "     → Lookup tables →

     "     → Type →

Process → Smooth
      "      → Sharpen
      "      → Filters → Gaussian blur

and anything else you feel like trying.

b) Try opening this image stack, from a microCT scan of a salamander larva (Ambystoma maculatum; the "PTA" in the filename stands for phosphotungstic acid, a stain that gives x-ray contrast to soft tissues.)

Under the Image → Stacks menu, try the Orthogonal Views, Reslice, and Z-Project functions.
With the stack open, try the 3D Viewer, and the Volume Viewer (under the Plugins menu). 

Try other stuff if you feel like it.

Wednesday, March 13, 2019

13 March: Magnification, acuity


1. Explain why the sun and moon appear about the same size, even though the moon is (a lot) smaller. Draw a diagram, and give a quantitative answer.
(Look up the diameters of the moon and the sun and their distances from the earth, and then calculate the apparent size (angular size) of each as seen from earth. Note that for a small angle θ (in radians, not degrees) tanθθ.)
How far would you hold a 2-cent (Euro) coin from your eye so that it subtends the same angle as the sun and moon (so it would just cover the full moon)? 
Be prepared to discuss this in class, and please write it up in a form you can hand in.

2. Watch this video about angular magnification (~8 minutes):

3. Watch this short video about human visual acuity (the first 3-1/2 minutes are the most important).

4. Try downloading and installing ImageJ (Fiji), and then try opening an image or two.