Tutorial, how to get an image with XDim

What you see:

When XDim starts only a tool box will appear, most of these tools will
have an effect only if an ACTIVE VIEWPORT is available. Only two icons
are different, located at the bottom of the tool box.

- An Icon looking like a rainbow => preference window will pop up
- An Icon looking like cards with a grid drawn on top of each other:

  => A NEW VIEWPORT IS CREATED
     **************************

The mouse:

XDim was designed to work with a three button mouse:

1. Button:	start action
2. Button:	force a normal redraw (for an explanation of a normal
		redraw start help in the tool box):
3. Button:	test value, in most windows XDim allows you to get the
		coordinates and value of the data under the mouse pointer
		without starting an action.

How to cook the first image:

0. If you want to try importing an gif/jpeg picture first, PLEASE load the
   00picview.prf preference file from the examples subdirectory. Also
   note that XDim was NOT designed to be a picture viewer, XDim will ALLWAYS
   use a 3D representation of the picture => 1024x1024 image needs 2*1024*1024
   triangles 3d-transformed AND every triangle may include more than one
   pixel (p.ex. 10 => 20 971 520 caculations in 3d Space). Keep this in mind
   when you compare XDim with image viewers like xv.
   
   Some hints to keep in mind with real life pictures:

  -TO ACTUALLY SEE THE IMAGE FORCE A NORMAL REDRAW WITH THE MIDDLE MOUSE
   BUTTON.
  -The ordering of color information to height uses the energy of the color,
   (similar to black and white) this is purely RANDOM, because there is NO
   natural order scheme for colors.
  -This energy ordering gives for some pictures a height relation that actually
   looks like a real 3d objekt. "Good" images are: monocolored background,
   point lighting source (so energy will fade with depth). This is the classic
   portrait situation.
  -For some images there will be practically no relationship between what XDim
   shows and its "real" 3d representation (think of a colored wallpaper).  
  -For all images is true, START with NO rotation angle => look at it straight
   from above => should look like in a standard image viewer => try small
   rotation angles and REDUCE THE Z-SCALING to a small value to get good
   (=interpretable) results.
  -The 00picview.prf does the things suggested for importing pictures in
   Nr. 6.
  -Check out the effect of color interpolation on image presentation:
      import jpeg/testimg.gif
      force a normal redraw (middle mouse button)
      switch color interpolation on and off (Setup -> Preferences -> Preferences
         -> Misc -> Color Interpolation)
      the interpolated image will look strange/blurred
      load the examples/blacknwhite.prf preference file
      the image (after a normal redraw) should look like a black and white
      now switch color interpolation on and off again
      this time the interpolated image will look better
      zoom in (perhaps to the eye of the lady), now the effect of color
         interpolation becomes even more apparent.

   This happens, because there is NO natural order scheme for colors, while
   for black and white there is. To remove this effect, there will be a RGB
   separation option in the next (and probably the last release)

***PLEASE NOTE, images tend to have a few hundred pixels in x- and y-direction,
   therefore ALL LINE REDRAW MODES LIKE (LINES, HIDDEN, HIDDEN&FILLED ...) will
   be practically USELESS. They will only fill the image with a block of the
   line color (typ. BLACK).

1. Load a new preference file, the built in color palette was designed
   for systems with 16 colors, a good start is rainbow.prf. To see the
   color palette, pop up the preference window (Depending on your hardware,
   the internal representation of colors may differ from what you see, BUT
   exported images will always use the internal representation).
   To load a preference file use File/preferences from the tool box
   or File/Load in the preference window. Example preference files are in
   the examples subdirectory.

2. Create a viewport and load a file (p.ex. bfield.xd) from the examples
   subdirectory. To load a file use File/Load in the viewport window. After
   the file is loaded a GRID should appear on in the viewport showing the area
   of your data set.

3. Toy around with with the Icons in the Tool Box, they should rotate/move etc.
   the data set in the window. If screen redraw is very slow p.ex. if you use
   XDim over a network use Tool Box Setup/Fast Redraw and set it to lines
   or grid, this should fasten things up. To do a multiple move just LEAVE
   THE BUTTON PRESSED a timer is used to determine the next redraw request.

4. Use Button 2 (Middle Button) of the mouse over the drawing area of the
   viewport or Data/Redraw to force a normal redraw. A colored representation
   of the data will appear after some time, the look of this representation
   is changed in the Tool Box with Setup/Normal Redraw.

5. It is a good idea to use help in the different windows to get a hint of
   the possibilities of XDim p.ex. it is possible to change to height->color
   decoding in every viewport separately.

6. Try to import a picture p.ex. testimg.gif from the jpeg subdirectory.
   To make pictures like gif's etc. look good, you will probably have to
   turn off the color interpolation, which is in the preference window
   (rainbow icon), menu preferences->misc->interpolate colors. This is
   due to the effect of color interpolation. Exception are grayscale pictures
   that will actally look better with color interpolation turned on.

7. Try to import a data set from your favorite table calculation program
   or spread sheet.

8. Load the small.xd data set and interpolate it with Data/Size to a new
   size either linear or with spline.

9. Create a complex data field, interesting effects are produced by using
   testimg.gif as the imaginary part and small.xd as the real part (after
   interpolation to the same size as testimg.gif). Use the complex redraw
   modes from Setup/Normal Redraw.

10.Try the complex example bfx/bfy.xd. These two files are linked together
   as real/imaginary part. This enables you to test the complex redraw
   modes.

11.XDim was not designed to visualize 1-D data sets, but it is possible
   by setting width or height to 1 (NOT 0, see p.ex. line.xd). But in
   this case you will have to rotate to data set to see something usefull.
....
