Display operations



Show image


source show

?-mode thumb | sfp | tmap | eviewer (thumb)?.........Mode


Returns: void

Shows an image as a thumbnail (in the Main window), depending on the -mode parameter. Note: this operation will not do anything in HuScript, because it requires a graphical interface.



Plot axial flux


source plotFlux

?-color spectral | indexed | grey (spectral)?.........Color mode


Returns: Plots the axial light flux.

A diagram is popped up where the Y-axis represents the sum of the intensities in an x-y plane, and the X-axis the plane number converted to the axial distance in microns.

The different datasets for the existing image channels are plotted in different colors, depending on the -color option. They can have colors as specified by the emission wavelength of the channel, use a color from an indexed series, or use a grayscale mode that can be useful to save as PostScript.

The plot window allows some interactivity to explore the datasets. See the wiki article http://www.svi.nl/DataPlotter for more details, or press H while the focus is in the plot window.
The diagram can be saved to a PostScript file by pressing S, and the data exported to a CSV file by pressing E. To dismiss the window press Q or Escape.

Plot an intensity profile


source plotProfile  <start vector> <end vector>

?-mode all | one (all)?.........Mode

?-chan value (0)?.........Selected channel

?-color spectral | indexed | grey (spectral)?.........Color mode

?-s value (1.0)?.........Sample interval (pixels)

?-unit px | mu (px)?.........Horizontal axis unit

?-q high | low | trunc (high)?.........Quality


Returns: Plots the intensity profile over a line.

Compute MIP/Sum projection


source miniMIP -> destination

?-dim IndexVector (32 32 0 0 1).........Dimensions

?-mode MIP | sum (MIP)?.........Projection mode

?-maxPlanes value (0)?.........Max XY Planes


Returns: dimensions of projected image.

The destination is always in float representation and contains as much stacked channels as the source.

The maximum number of XY-planes specified by the -maxPlanes option are evenly spaced in the Z-direction.

See also: multiMIP, slice and chan2rgba.

Compute multiple MIP projections


source multiMIP -> destxy destxz destyz

?-srco IndexVector (0 0 0 0 0)?.........Source offset

?-span IndexVector (0 0 0 0 0)?.........Span

?-stride IndexVector (1 1 1 1 1)?.........Stride

?-axes xyz | xy | xz | yz | x | y | z (xyz)?.........Axis enable

?-channels all | none | list of channel numbers (all)?.........Channels enable

?-mode MIP | sum | slice (MIP)?.........Projection mode


The projection of light traversing in Z is displayed in destxy, the projection of light traversing in Y is displayed in destxz while the projection light traversing in X is displayed in destyz.

Example:

faba32 multiMIP -> a b c

This defaults to -axes xyz. Three MIP projections are rendered: in image `a' the z-slices of the xy-planes (identically to the miniMIP operation), xz-planes in image `b' and the yz-planes in image `c'.

faba32 multiMIP -> a b c -axes y

Only one MIP projection is displayed: xz-planes in image `b'. Images `a' and `c' remain unchanged.

demoSpheres multiMIP -> a b c -channels 1

Only the second channel is enabled. The indices are counted from 0.

Compute a perspective projection MIP in an arbitrary direction


source persMip -> destination transfMatrix

?-q fast | best (fast)?.........Quality


Returns: void.

Computes a single perspective projection MIP in an arbitrary direction. The transformation matrix specified by transfMatrix can be created with the createTransfMatrix command.

Do a MIP projection in front of a depth buffer


source depthMip depth -> destination transf


Returns: void.

Computes a MIP projection in front of surfaces as defined by a pre-existing depth buffer.

Add mip and depthmip to a surface RGBA image


source addMipToSurface depthMip surface -> destination alpha

?-multFactor string?.........MIP multiplication factor

?-transpMip value (0.5)?.........Transparency of MIP

?-transpSurf value (0.5)?.........Transparency of surface


Add mip and depthmip to a surface RGBA image.

Create a transformation matrix for rendering


source createTransfMatrix mip

?-model pitchYaw | axis (pitchYaw)?.........Rotation model

?-phi value (30)?.........Rotation angle

?-theta value (40)?.........Rotation angle

?-gamma value (0)?.........Rotation angle

?-shift vector (0 0 0 0)?.........Shift vector (%)

?-translate value (0)?.........Translation distance

?-zoom value (1)?.........Zoom factor

?-zoomMode relative | direct (relative)?.........Zoom mode


Returns a 3 x 4 transformation matrix and its inverse as a Tcl list of lists.
The mandatory mip argument specifies which image will be used as destination in a subsequent render command. The createTransfMatrix command adapts the transformation matrix to the image specifications of this image; no data will be written to this image.

Map slice to RGBA


source chan2rgba -> destination

?-col false | true | grey | hsv | rgb (false)?.........Coloring

?-gamma value (1.0)?.........Gamma

?-coupleChan?.........Couple channels

?-contrast auto | ifNecessary | useExtMaxMin (auto)?.........Contrast stretch

?-doSthres?.........Do soft threshold

?-sthres value (0.0)?.........Soft threshold % of range

?-mask string?.........Mask list

?-hsvList string?.........HSV triplet list

?-rgbList string?.........RGB triplet list

?-maxMinList string?.........List of per channel minima and maxima

?-multFactor string?.........MIP multiplication factor

?-doCustContrast?.........Apply a cusom contrast according to a constrast curve

?-custContrastList string?.........List per channel with custom contrast curve

?-roiIn image?.........Roi mask


Returns: void.

This method maps a gray scale image onto a RGBA colored one. The source image is a 2-D image. The destination must be in byte representation and always contains 4 packed channels. The size is adapted from the source.

The option -col defines the mode by which an one channel image is mapped to color. Multi channel images are never mapped in false or grey color. The colors in true color are determined by the global CE color list. In HSV and RGB modes the color is specified by the -hsvList and -rgbList options respectively.

Contrast streching is set to off if the -mode ifNecessary flag is on. Only if the intensity value is outside the 0-255 range, the contrast is adapted.

From version 2.3 on all conversions are done automatically: any type 2-D source image is converted to a packed, 4-chan image.

In older versions you need to create a suitable destination image where the source image can be mapped into.

Example: Image c is a 300 x 400 x 0 (2-D) image. This image can be mapped into a RGBA (representing 4 channels) image using soft thresholding.

img create foo -type byte -chanspec packed -dim {32 32 0 0} -chan 4
foo show -mode thumb
c chan2rgba -> foo -doSthres -sthres 50


On how to obtain a 2D projection from 3-D data see: miniMIP, multiMIP and slice. On soft threshold, see sthres.

List existing images


img list

?-visibility tcl | visible | hidden | any (tcl)?.........Image visibility


Returns: a list of images.

The visibility option:

  • tcl will list all the images accessible using tcl commands.
  • visible will only list images which are visible in the userinterface.
  • hidden will list all images which exist in Huygens Pro which cannot be accessed directly.
  • any will list all images.


Example: A newly opened Huygens Professional Main window, having only the default images a, b, c and psf, still has some internal images, not accessible by a tcl command:

img list -visibility hidden

=>a:thumbMIP a:floatThumbMIP b:thumbMIP b:floatThumbMIP c:thumbMIP c:floatThumbMIP psf:thumbMIP psf:floatThumbMIP

Is your machine unexpectedly slow or memory intensive? Use this command to explore if any unnecessary images are in the memory of the system!

Test image existence


img exists <name>

?-visibility tcl | visible | hidden | any (tcl)?.........Image visibility


Returns: `1' if in use or `0' if not in use.

See also "List all the existing images".

Compute top view SFP rendering of image


source topSfp -> destination

?-objSize value (.3)?.........Typical object size (micron)

?-ex vector (1.0 1.0 1.0 1.0)?.........Excitation transparency

?-em vector (1.0 1.0 1.0 1.0)?.........Emission transparency

?-eff vector (1.0 1.0 1.0 1.0)?.........Material efficiency


Returns: void.

Computes a top view SFP rendering1 of an image.

Compute ortographic SFP rendering of image


source paralSfp -> destination

?-phi value (0)?.........Horizontal angle (deg)

?-theta value (0)?.........Vertical angle (deg)

?-zoom value (1)?.........Relative zoom

?-lightPhi value (-45)?.........Horizontal light angle (deg)

?-lightTheta value (45)?.........Vertical light angle (deg)

?-objSize value (.3)?.........Typical object size (micron)

?-objPhi value (0)?.........Object horizontal rotation (deg)

?-ex vector (1.0 1.0 1.0 1.0)?.........Excitation transparency

?-em vector (1.0 1.0 1.0 1.0)?.........Emission transparency

?-eff vector (1.0 1.0 1.0 1.0)?.........Material efficiency

?-table off | normal | mirror (normal)?.........Table style

?-tableDist value (0.25)?.........Table distance

?-q fast | normal | best (fast)?.........Quality

?-size auto | smallest | 120x90 | 160x120 | 320x240 | 480x360 | 640x480 | 900x675 | 1200x675 | 2400x1350 | 3600x2025 | largest | dest (320x240)?.........Canvas size


Returns: void.

Computes an ortographic view SFP rendering of an image.


1. http://www.svi.nl/SFP