Skip to content

File_Max_Projection

bene51 edited this page Oct 25, 2013 · 11 revisions

Originally, radial maximum projection was done in real-time, i.e. data was processed as it came from the cameras, and only the projections were saved. For people who do not have the same setup as we, especially not the same cameras, we created a version that reads data from the hard-drive instead.

Parameters:

  • Configuration file: A configuration file with values for certain parameters. The contents of this files are described in more detail below.
  • nChannels: The number of channels.
  • Input directory: Folder containing the input data. The form of the input data is described in more detail below.
  • Output directory: Folder where the output should be stored to. The output is described in more detail below.

Input data

The input directory should contain a number of folders, one for each angle and channel and time point. The names of these folders should be in the form "tp%04d_c%03d_a%04d". For example, the folder for time point 0, channel 0 and an angle of 45 degree should be called "tp0000_c000_a0045". In each folder, the planes are stored in individual files of the form "%04d.tif".

Output

  • In the output folder, the geometry of the sphere is saved as "Sphere.obj" in the wavefront file format.
  • For each channel, a folder 'channelX' is created in the output folder, where X is the number of the channel.
  • For each view, a .mat file is created which saves
    • The name of the angle
    • The angle under which this view is best imaged
    • The aperture (i.e. the angle around 'angle' which is used from this view)
    • If this view was acquired by transforming the sample, than a transformation which registers this view to the reference view.

Configuration file

Here is an example of a configuration file:

# Example config file for the radial maximum intensity projection

# The width of the input images (in pixels)
width=444

# The height of the input images (in pixels)
height=440

# The number of planes of an input stack
nPlanes=201

# The width of a pixel in real-world units (e.g. um)
pixelwidth=2.6

# The height of a pixel in real-world units (e.g. um)
pixelheight=2.6

# The depth of a pixel in real-world units (e.g. um) (the z spacing)
pixeldepth=4.0

# The coordinates of the center of the sphere used for radial projection:
centerx=587.82904
centery=522.97534
centerz=367.6763

# The radius of the sphere
radius=345.3111267089844

# Radial maximum projection can be done in sublayers.
# This specifies the number of layers:
nLayers=1

# The width of each sublayer
layerwidth=140.0

# The number of time points acquired
nTimepoints=1

# A 'view' defines the portion of the input image used for the final
# reconstruction. It consists of 
# - An angle at which the image has the best quality,
# - An aperture which specifies which region around the angle should be
#   used of that view for the final reconstruction.
# - A name for that angle/view
# - A transformation: If this view was obtained by transforming (rotating) the sample,
#   this is the transformation that registers this view to the reference view.
#
# The rest of the config file contains values for these parameters.
# Let's assume we have a SPIM setup with two illumination sides and two detection directions,
# and the cameras are rotated by 90 degrees, so that the rotation axis is the x-axis. Let's further assume
# that we have 4 views, one for each combination of illumination and detection direction.
# Looking from the left onto the image stack, we have:
#
#                  illumination 1
#               ---------------------
#               |    45   |   135   |                          x
#               |         |         |                         /
#     camera 1  |---------|---------|  camera 2     z <-----/
#               |         |         |                       |
#               |   -45   |  -135   |                     y |
#               ---------------------                       v
#                  illumination 2

# The number of angles/views
nAngles=4

# The values of the angles can be seen in the illustration above
angle0.value=135
angle1.value=-135
angle2.value=45
angle3.value=-45

# A name for each view
angle0.name=0135
angle1.name=0225
angle2.name=0045
angle3.name=0315

# Each angle covers 90 degrees:
angle0.aperture=90
angle1.aperture=90
angle2.aperture=90
angle3.aperture=90

# These 4 views can be captured without rotating the sample. Otherwise, the 3D transformation
# matrix would be given as 16 values, row by row.
angle0.transformation=1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
angle1.transformation=1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
angle2.transformation=1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
angle3.transformation=1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
Clone this wiki locally