Table of Contents
marView - image display and analysis program for images collected on
a mar research Imaging Plate Detector System
marView [ -a (--autoload)
] [ -b (--browser) name ] [ -c (--colors) N ] [ -f (--follow) file ] [ -g (--geometry)
[WxH][+X+Y] ] [ -h (--help) ] [ -i (--invert) ] [ -555 (--mar555) ] [ -m (--minmax)
N ] [ -p (--pixelsize) size ] [ -sc (--scale) linear|square|log|cubic|fwhm ] [ -v
(--verbose) ] [ -x (--fastaxis) NX ] [ -y (--slowaxis) NY ] [ -z (--zoom) N ] [ filename
marView is a Motif-based graphical user interface for display
and analysis of images collected on mar research Detector Systems (scanners
and CCDs). The program can:
- display images using several color schemes.
magnified areas of the image.
- display cross sections.
- display and manipulate
- estimate cell constants.
The behaviour of image display can be configured in a configuration file
/etc/marrc or $HOME/.marrc. See the marrc man page for details.
The main window controls
the most important display functions. If consists of the following areas:
- marView now cooperates with the mar555 data collection programs,
in particular with program mar555prc, which produces Cartesian output
files from the mar555 flatpanel detector. When started with option -mar555,
marView reads a file $HOME/.mar555prc which is updated by program mar555prc
and contains timestamps and filenames. marView automatically loads new images
as soon as they become available.
- -a (--autoload)
- The program looks once
per second for file "$MARVIEWDIR/marview.com" or "$MARLOGDIR/marview.com"
or "./marview.com". If available, the file is read. This ASCII file may contain
one or two lines with a filename specifying an image file or a spot file
to be loaded. If the given files exist, they are loaded directly by marView
- -b (--browser) name
- Uses program ’name’ as help browser instead of the
- -c (--colors) N
- Uses N colors instead of the default (64).
- -g (--geometry) [WxH][+X+Y]
- Gives the initial geometry of the marView window.
You may specify the width (W) and height (H) of the window as well as the
coordinates X and Y of the upper left corner. It is useful to set an alias
to marView with a certain default geometry depending on your window manager.
- -f (--follow) filename
- The program looks for image file "filename". If available,
the image is loaded. The image no. is increased and the program tries to
load the next image, etc.. If the image cannot be found, the program waits
until it becomes available.
- -h (--help)
- Prints a summary of program command
- -i (--invert)
- Inverts colors (Grey and Blue scales only, see
- -m (--minmax) N
- Use N as max. value for the histogram of a newly loaded
image. Usually, marView determines automatically how to distribute colors
for showing an image based on the histogram of pixel values. The max. histogram
value used for scaling can thus be restrained to a certain value.
- -p (--pixelsize)
- The size of one pixel in mm. The default is: 0.150 mm -sc (--scale) linear|square|log|cubic|fwhm
This keyword overrides the values given on keyword display_scale read
from the marrc file (see marrc man page for more details).
- -v (--verbose)
verbosity level (up to 2) for more program output.
- -x (--fastaxis) NX
- -y (--slowaxis)
NX marView can read raw binary arrays of NX*NY 16-bit pixel values. In order
to display them correctly, you need to tell the program how many pixels
are to be found in 1 horizontal line ("fastaxis") and how many in vertical
- -z (--zoom) N
- Chooses another default zoom mode (see below).
Valid choices for N are 0, 1 and 2. The default is: 0
- The program
directly loads the image "filename". See section INPUT FILE for a description
of currently supported image formats.
- see sections FILE MENU, OPTION MENU and HELP
- Image display area:
see section MOUSE ACTIONS
- Color area:
- see section COLORS.
- Image load buttons:
- Buttons to load images with image numbers decremented by 1 (>) or incremented
by 1 (>) or continuous incrementing (>>). There is also a "Stop" button to
stop continuous incrementation.
- Magnification buttons:
- see section MAGNIFICATION.
- Image save button:
- This button saves the part of the image currently displayed
in the image display area into a graphics file with the default file name
"$IMAGENAME.xwd" where $IMAGENAME is the name of the currently loaded image.
The file format corresponds to the "X Windows system window dump" format.
It can be converted into any desired graphics format (tiff, jpg, gif) with
standard freeware utilities (xv, convert from the ImageMagick suite) or
into PostScript with program "xpr" (SGI, DEC Unix).
- Spot buttons:
display of spots loaded from a spot file. When the "Edit" button is pressed,
an additional set of buttons shows up in the upper left corner of the image
display area that allows to add and remove spots from the spot file. Always
press "Done" when finished editing.
Displayed coordinates are always with
the origin in the lower left corner, x being the horizontal axis (running
from left to right) and y being the vertical axis (running upwards).
The "File" menu can be obtained by pressing the "File"-button or by
typing: "Alt+f". The following choices are offered:
The "Options" menu can be obtained by pressing the "Options"-button
or by typing: "Alt+o". The following options can be set:
- Open File:
- Pops up
the ’File selection’ window. Shortcut: Ctrl+o. See OPEN FILE.
- Pops up
the ’Color’ window. Shortcut: Ctrl+c. See COLORS.
- Pops up the ’Color’
window with a histogram only of the image area. Shortcut: Ctrl+h. See COLORS.
- Pops up the ’Save’ window. Shortcut: Ctrl+v. See SAVE.
- Pops up the
’Set’ window. Shortcut: Ctrl+s. See SET.
- Quits program. Shortcut: Ctrl+q.
button can be activated by pressing it or by typing: "Alt+h". The option
"Contents" calls an instance of the desired web browser that directly loads
this man page from $MARVIEWDIR/marview.htm or $MARMANDIR/html/marview.htm
or ./marview.htm (in the order given).
- Show/Hide resolution
- The center of diffraction can be set in the "Set"-window (see SET).
- Show/Hide statistics (average and max. intensity).
- Keep/Do not keep color
- When loading a new image, the image will be drawn in the same way
as the previous image (see COLORS).
- Turn ON/OFF 3-D plot:
- When working at
magnifications > 4, the displayed magnified area will be drawn in 3-D style.
Note: this option may take considerable CPU-time.
- Resize on zoom:
- When selecting
a zoom area with the right mouse button, the marView window will automatically
be resized according to the boxed area. The default is to leave the original
- Next image:
- Loads next image, i.e. with its image number incremented
- Previous image:
- Loads previous image, i.e. with its image number decremented
- Zoom modes:
- Choice of N’th pixel, average or maximum pixel. This affects
the way the image looks at magnfication factors < 1.0 only. If one pixel
on the monitor corresponds to more than one pixel in the image, the program
will take only one image pixel to display and ignore the neighbours (n’th
pixel) or take the average of the neighbours or their maximum, respectively.
Note, that "N’th pixel" mode is faster than the others, since no calculation
- The contents of the displayed image area is integrated.
Only available at magnifications > 1.0! From version 7.5 on a histogram is
plotted from the pixels contained within the display area.
To change magnification
factors, select the "Full Image", "Zoom +" or "Zoom -" buttons on the left
hand side of the main window. Available magnifications factors are 0.25,
0.5, 0.75, 1, 2, 4, 8, 16, 32, 64 and 128, where 1 means: 1 pixel on the
screen is 1 pixel in the image. If the full image fits within the window,
no further demagnification will be achieved. Magnification levels >= 1.0 are
shown in the upper left corner of the image display area.
In the image area, the 3 mouse buttons have certain functions
depending on the magnification level.
marView offers choices
for drawing plain cross-sections, for circular and for radial plots (see
SET for details). The default choice is a plain cross-section. This corresponds
to "Single Crystal"-plot mode.
- Left mouse button:
- Draws a line from
point A to point B and displays the pixel values along that line in a separate
window (see CROSS-SECTION). This works for all magnification levels.
- Displays x,y-coordinates, intensity and resolution of the
selected pixel (upper left area of the window). At magnifications <= 1.0 the
contents of an box (red) around the cursor is integrated. The minimum,
maximum, average and sigma of the pixels contained in the red box will
be displayed in the upper right area. The size of the integration box may
be changed (see SET).
- Right mouse button:
- At magnification levels < 1.0,
a box is drawn from cursor position A to position B. If the mouse button
is released, the image area within that box will be displayed in the same
window with the corresponding magnification factor. Once the magnification
level is >= 1.0, the right mouse button will not further zoom in, but recenter
the displayed around around the mouse pointer position. By this method,
you can move around within the image!
Plots can be obtained by pressing the left
mouse button in the image area of the display window. The cross-section
plot can be used for measuring distances and thus getting an estimate
of cell constants. In the plot area two dashed lines can be moved around
by pressing the left (left bar) and right (right bar) mouse button, respectively.
The distance between bars is given in pixels and mm. The upper horizontal
scale in the plot area is the length of line in pixel units, the lower
one the length in mm.
In "Texture" mode, the plot shows the intensities
along the circumference. The upper horizontal scale in the plot area is
the position on the circumference in degrees with the starting point of
the circumference in the 3 o’clock position (as usual). The lower scale shows
the corresponding position in mm.
In "Powder Diffraction" mode, the plot
shows the average intensities of all pixels along the circumference of
a ring at a given radius The upper horizontal scale in the plot area gives
the radial position in pixels, the lower one the radial position in mm.
In "Single Crystal" mode, to calculate cell constants, the no. of peaks
between the left and the right distance measuring bar must be entered. Place
the bars on top of two peaks. The no. of peaks must include the first and
One can save the contents of the current plot as ASCII file by
pressing the corresponding button in the "Cross-section" window. The contents
of the ASCII file are "x,y,interpolated intensity", one line per value
in FORTRAN-format 2F8.1,F10.1 (C-Format %8.1f%8.1f%10.1f). The origin is in the
lower left corner, x is horizontal, y vertical. The file name is set automatically
as "$IMAGENAME.lis" where $IMAGENAME is the name of the currently loaded
One can also save the contents of the current plot as graphics file
by pressing the corresponding button in the "Cross-section" window. The graphics
file is in "X Windows system window dump" format and the output file name
always is "crossplot.xwd". ".xwd" files can be converted into any desired
graphics format (tiff, jpg, gif) with standard freeware utilities (xv,
convert from the ImageMagick suite) or into PostScript with program "xpr"
(SGI, DEC Unix).
By default, 64 colors are distributed in equidistant intensity
bins between a minimum (Min) and maximum (Max) value. All pixel values >
Max are drawn in one color and all values < Min in another color. Min usually
is 0, but Max is calculated such that 99.998 % of all pixels in the image
have intensities <= Max. The Max and Min can be entered on the left hand
side of the image display window (upper left and lower left corner, respectively)
or in the "Colors"-window which can be obtained by selecting the "Colors"
option in the "File"-menu or by typing "Ctrl+c". In the "Colors"-window, the
histogram of the pixel values in the image is displayed, i.e. the intensity
of a pixel versus its frequency. In the histogram plot, two dashed bars
mark the Min and Max values. To change Min or Max, enter values in the corresponding
fields (and press RETURN!) or move the left or right bar using the left
or right mouse button, respectively. Warning: each operation requires recalculation
of the whole image (CPU!). Note also, that by entering values in the text
fields and pressing RETURN, the aspect of the plot will be changed: the
plot will now start at a value slightly smaller than Min and end at a value
slightly larger than Max. Placing the bars with the mouse will just redraw
all colors accordingly.
To change color schemes, select "Gray scales" or
"Blue scales" or "Rainbow". By dragging the middle mouse button in the histogram
plot or in the color area of the image display window, colors can be redistributed.
This option works for 8-bit color displays, only.
The "Colors"-window will
also open when the choice "Histogram" has been selected from the "File"-menu.
Thist time, though, the pixel value histogram in the color window is based
only on the pixels shown in the image area and NOT on all pixels in the
This window allows for selection of an image or spot file
to be displayed. The "Search Pattern" consists of a search path (i.e. directory)
and a search string (e.g. *.*). Press return to apply the search pattern. In
the "Images" listing a file may be selected by pressing the left mouse
button. A double click is equivalent to pressing the "Load" button.
"Follow" button is a utility to automaticatillay load images after increasing
image numbers. If pressed once, the "Follow" button changes its label to
"Stop". Press "Stop" to leave the automatic image loading mode.
automatically determines wether a selected file is an implemented image
format or an implemented spot format and loads the files accordingly. See
section INPUT FILES for a list of implemented formats.
is used mainly for setting parameters affecting the cross-section plot but
also has input fields for distance, wavelength and phi as well as choices
affecting the size of the integration box in the image display area.
wavelength, starting and ending PHI:
- Distance, wavelength, starting and
ending PHI are usually taken from image headers. If these values are missing
or just wrong, the values may be given here. They are needed for correct
calculation of the resolution rings and/or display of spot files. When an
image is loaded, the entries found in the image header will always update
the values given here, unless the "Fix"-option is set.
- Integration box:
- The size of the integration box that shows up when the middle mouse button
is pressed defaults to 50 by 50 pixels. In the "Integration box" input field
you may alter this value.
- Line width:
- The width of lines of a cross-section
usually should be 1 pixel, but you are allowed to increase this number
if not working in "Powder Diffraction" mode.
- Center of diffraction:
default, the values for the center of diffraction will be taken from image
headers. In many cases, there will be dummy values only corresponding to
the actual center of the image. The values given for the center of diffraction
affect only the display of resolution rings. For convenience, one can take
the center values directly from the "[x,y] at start" and "[x,y] at end"-fields
which are updated automatically by pressing the left mouse button.
are 3 different types of drawing plots:
- Single Crystal:
- Draws a straight
line from the position of the left mouse button press to the position of
the left mouse button release. If the line width is larger than 1, the
interpolated values of neighbouring pixels are summed up and averaged.
- Draws a circle centered at the position of the left mouse button
press with a radius corresponding to the position of the left mouse button
release. The resulting "texture" plot shows the intensities along the circle
circumference. If the line width is larger than 1, the interpolated values
of neighbouring pixels are summed up and averaged.
This mode is called
"Texture" mode since in texture analysis one typically looks at intensity
variations (modulations) along the circumference of diffraction rings.
- Powder Diffraction:
- Draws a circle centered at the position of the left
mouse button press with a radius corresponding to the position of the left
mouse button release. The resulting plot shows the average intensities of
all pixels along the circumference of a ring at a given radius starting
at the mouse button press with a radius of 1 pixel and ending at the mouse
button release with a radius corresponding to the distance between mouse
press and release.
In this mode, only a line width of 1 is allowed.
mode is called "Powder Diffraction" mode since in powder diffraction one
typically looks at integrated intensities of powder rings. Reflections show
up as peaks in the "powder diffraction plot and can easily be integrated.
For each plot type one can use the left mouse button for selecting the
starting and the ending point of the plot. However, one can also fix the
starting point of the plot as well as the ending point. It is certainly
useful in "Texture" or "Powder Diffraction" mode to set the starting point
to the center of diffraction. The values may be entered manually in the
"[x,y] at start"-fields. You must select the "Fix"-button on the right hand
side of those fields to fix the coordinates, otherwise by pressing the
left mouse button always the current x,y-coordinates are entered automatically.
In "Single Crystal"-mode one can set the ending coordinates by fixing the
"[x,y] at end" and entering the desired x,y coordinates or by fixing the
"Length & angle" and entering the desired length of the line and the angle
(where 0 degrees = 3 o’clock). In "Texture" and "Powder Diffraction" modes
only "Length & angle" can be fixed.
This window is used for
writing complete or partial images out to disk in several formats:
The following logical names affect program
function, but are all optional
- Whole image only (colors or grey scales).
- Whole image only. Scale factors
may be applied to reduce size of output file. A factor of 1.0 means: no
loss of information.
- SGI Image:
- Whole Image or Zoom Area. Scale factor may
be applied. The output file ("rgb") can be manipulated using programs imgview,
imgworks and the tools from SGI’s imgtools suite. Otherwise standard freeware
utilities (xv, convert from the ImageMagick suite) are available for manipulation
and format conversion.
- Directory containing file marview.htm.
Directory to look for file marview.com to be used with option --autoload.
- Directory containing file html/marview.htm.
to look for file marview.com to be used with option --autoload.
is assigned, MARMANDIR and MARLOGDIR will be ignored. If neither MARVIEWDIR
nor MARMANDIR are assigned, marview.htm may be taken from the current directory.
If neither MARVIEWDIR nor MARLOGDIR are assigned, marview.com will be taken
from the current directory.
The program automatically determines
wether a selected file is an implemented image format or an implemented
spot format and loads the files accordingly. The following image formats
- Images in mar345 format. Usual extensions: .marXXXX
where XXXX is 1200, 1600, 1800, 2000, 2300, 2400, 3000 or 3450
in mar "image" format (also mar300). Usual extensions: .image
in mar "pck" format. Usual extensions: .pck
- Images in "CBF" format. Usual
extensions: .cbfXXXX where XXXX is 1200, 1600, 1800, 2000, 2300, 2400, 3000
- Images in "CIF" format. Usual extensions: .cifXXXX where XXXX
is 1200, 1600, 1800, 2000, 2300, 2400, 3000 or 3450
- Images in marCCD
format. No standard extension
- Images in raw 16-bit format. The name extension
must be (at least) ".raw". This file format is supposed to contain a raw
array of 16-bit values (2-bytes) without header, trailer or high intensity
records. It is supposed to contain sqrt( total_bytes/2 ) pixels in x-direction
and the same in y-direction. The first pixel is in the upper left corner
and the fast varying axis is horizontal.
Besides image files, the following
spot file formats are implemented:
- Spot files produced by programs
marpeaks/marPeaks to be used for indexing with marIndex and marrefix. Usual
extensions: .mar or .pks
- Spot predictions produced by program
marPredict. Usual extension: .prd
- Spot search list produced by program
XDISP (HKL suite). Usual extension: .file
- DENZO X:
- Integrated spots produced
by program DENZO (York format only). Usual extension: .x
- Spot prediction
produced by program ipmosflm. Usual extension: .gen
- XDS COLSPOT:
- Spot search
list produced by program XDS, step COLSPOT. Usual extension: .SPT
- XDS IDXREF:
- Indexed spot search list produced by program XDS, step IDXREF. Usual extension:
- XDS COLPROF:
- Integrated spots produced by program XDS, step COLPROF.
Mandatory name: XREC.XDS
- XDS CORRECT:
- Integrated and scaled spots produced
by program XDS, step CORRECT. Mandatory name: XDS.HKL
From the list of spot
formats, only MARPEAKS, XDISP, and XDS COLSPOT are editable.
file formats contain images from more than one images. For those formats
only selected spots will be displayed. In the case of MARPEAKS, only spots
will be displayed where the range for the first and last image covers the
current image number (as deduced by the image number in the image name).
In the case of the XDS formats, the starting and ending PHI of the current
image as given in the "SET" window (see SET) will be used and compared
to the PHI value in the spot file. In the case of MOSFLM, the image number
in the spot file header must match the current image number.
For all spot
formats, fully recorded spots are drawn as red crosses and partials are
drawn in green. PHI overlaps are drawn in blue (MARPREDICT only) and split
spots from a second wavelength contribution are drawn in orange (MARPREDICT
only). XDS formats don’t carry information about partiality, so in this case
a spot is assumed to be partial if the PHI value of the centroid +/- 0.5
degrees is smaller or larger than the starting and ending PHI, respectively.
From the SAVE WINDOW one can produce output files in several
formats: PostScript, TIFF or SGI Image (see above). From the CROSS-SECTION
WINDOW and the MAIN WINDOW one can also produce "X windows system window
dump" files (see above).
mar345, marPeaks, mar345_formats, mar300_formats,
Claudio Klein, marXperts GmbH, Norderstedt, Germany
Copyright 2000-2012 marXperts GmbH, Norderstedt, Germany
GmbH||Phone: +49 - (40) - 529 884-0|
|Werkstr. 3|| FAX: +49 - (40) - 529 884-20|
Norderstedt - GERMANY||info@marXperts.com|
Table of Contents