DIGITIZE

Welcome to Digitize 1.38, a windows X,Y plot digitizer.

About Digitize

Description

Installation

Using Digitize

Menus

Buttons

Remarks

Registration

Responsability

Revisions

Comments and Suggestions

WinFit


About DIGITIZE

DIGITIZE 1.38

Written by Y. Danon

March 1993

This copy of  DIGITIZE is an evaluation version that can be registered to become the full operating version upon receiving a user code from the author. This evaluation version has all the features of the registered code except limitations maximum 10 digitized points and a disabled COPY X,Y function. Upon registration you will get a user registration code that will remove the opening screens and all the limitations.

Programming and thinking time were invested in this program to make it easy to use and useful, please consider registering.


Description

Digitize is an Un-Graphing program, it can import a scanned X,Y plot and digitize it to end up with a text file (or clipboard data) containing the X,Y points.

This program is written in Visual Basic so you need the VBRUN200.DLL, you would probably also need a scanner to scan your plots and save it as a bitmap file (BMP or PCX). Digitize also accepts bitmaps pasted from the clipboard.


Installation

First place the VBRUN200.DLL in your /WINDOWS directory. Create a directory ( for example /windows/digitize) and copy all files to that directory, You can now use the file manager to drag and drop the program icon into a group in the program manager.

If You use other Visual Basic programs it is recommended to put the VBRUN200.DLL and all the .VBX files in the /windows/system directory. It this way other VB programs can use the same files.


Using Digitize

1. There are two ways to get the scanned image into DIGITIZE, the first is to load  a BMP or PCX file and then DIGITIZE can open and read the file. The second is to Paste the file from the clipboard. Digitize can only paste a bitmap formatted data  from the clipboard.

2. After the plot was loaded (from a BMP or PCX file) or pasted, define the origin by clicking the Define Origin option button (it should be automatically selected as you start the program) and insert the plot origin X,Y values in the X= and  Y= boxes (you can use TAB to move between them). Point the mouse to the plot origin and click the left button.

3. The program will automatically select the Define-X option button, you should then provide the X value in the X= coordinate box and click on the X-axis position corresponding to that value. It is recommended to point the mouse to the end of the X-axis and then click. The plot rotation angle is determined from the X-axis line and Digitize assumed that the Y-axis is perpendicular to the X-axis.

4. Define the Y axis in the same way.

5. Now the Digitize option button is selected and as the mouse moves the plot X,Y coordinated are displayed in the X= and Y= Boxes. if the X or Y axis are log check the X-Log and/or Y-Log option accordingly.

6. Point the mouse to a point on the curve and click, the X,Y points will be inserted to the List Box.

7. To use the Tracer feature of  DIGITIZE, position the mouse on the left side of the curve to be digitized and click the right mouse button. You can check the Test Trace box to see how the trace goes before you digitize. After you test the trace and before you digitize you will have to refresh the plot in order to remove the green trace curve. This can be done by double clicking on the plot (only in test trace mode) or by clicking on the refresh plot button, there is no need to redefine the axis.

To direct the Auto Tracer use the Blockers.

8. Use the Save As to save the X,Y data.

For more details please read the rest of this help file.


Menus

File

Edit

Data

Options

System

Help


File

Open

Opens a BMP or PCX file that contains the scanned plot to be digitized. The program can automatically size the picture to the screen if not in scroll mode. If the plot is too big you might get an out of memory error, it is than recommended to resize the plot before you load it.

A PCX file is loaded with the help of the Paintbrush program that comes with windows 3.1 you must have the program pbrush.exe in the path (normally in the windows directory). If Digitize can not find pbrush.exe a file not found error will occur

Save As

Saves the data in the list box to a text file in two columns X and Y.

It is also possible to add comments to file by typing the text in the comments text box. The comments will appear in the first line of the file.

Reload Plot

Reloads the plot from the file. Note that if the Test Trace option is set, double clicking on the plot refreshes the picture without reading the file.

Exit

Exits Digitize, if there are points in the list you will be asked to save them.


Edit

Paste Plot

Pastes a bitmap picture from the clipboard, if a bitmap picture is not found in the clipboard an error message will be displayed.

Copy X,Y

Copies the X,Y data to the clipboard. you can select several option by setting delimiter from the Options menu

Clear Selected Data

Clears the selected data from the X,Y list box. This supports multiple selection.

Clear All Data

Clears the data from the X,Y list box.

Clear Last Blocker

Will clear the last blocker placed on the plot.

Clear All Blockers

Will clear all blockers from the plot.


Data

Sample

This command will open a sample dialog box, that will allow you to change the list box X,Y data points.

This command was created to add additional flexibility when digitizing using the auto tracer.

using the auto tracer you will normally end-up with many points in the list box. This command will resample the list box data at constant dX intervals.

The user can change the minimum and maximum X value and the interval dX or the number of points to end-up with.

The sampling algorithm does a linear interpolation between the points, the results of the interpolation is as good as digitizing the curve at the interpolated X points if the data in the list box is digitized with the auto tracer.

The interpolation can be done on a log X or log Y scale in the same way.

X,Y-->List

Returns the original digitized X,Y points to the list box after using the Sample command. (some kind of an undo command). This can also be used to refresh the list box after changing the data delimiter form the Options menu.

Sort

This option sorts the data in the X,Y list box you can choose for ascending or descending order.


Options

Stretch

This option will stretch the X axis of the plot to fit the full plot window (will not function in scroll mode).

No Refresh

Disables the plot paint event, the plot will not be refreshed when another window is overlaying the Digitize program window. This mode is useful on slow machines and/or a nervous user who doesn't like waiting for the screen to refresh.

Zoom

When selected the zoom windows will appear on the plot area. The window can be dragged to any position on the plot. The zoom magnification can be changed by moving the scroll bar located on the DIGITIZE window. Once the zoom scroll bar is selected (it will flash), the mouse can be moved to any section on the plot and the zoom power can be changed with the left and right arrow keys, the zoom window will then be updated continuously.

Refresh List

When this option is Disabled DIGITIZE will not refresh the X,Y list box when writing data to it. This will increase the speed of these operations. This is most noticeable in the Auto Trace mode.

List Delimiter

Determines the delimiter between the X and Y points in the list box. This will also be the delimiter for the FILE SAVE and COPY X,Y operations.

Scroll

This Changes DIGITIZE working mode to scroll mode. In this mode the bitmap picture is not resized by DIGITIZE instead it is displayed with scroll bars. This feature makes it possible to digitize in the resolution of the bitmap picture even if it exceeds the screen resolution.

The other features of digitize work the same including the trace mode. The trace mode scrolls the plot automatically. The parameters that control the scrolling are XJump and YJump in the DIGITIZE.INI file. These parameters were set for a high resolution display (1024x768). if you have a lower resolution display and the picture Jumps to much during the auto trace you might want to decrease XJump & YJump values.

Trace

Trace has a sub menu with 3 options:

Tracer1

Tracer2

 	Scan

These are three different automatic digitizing modes; where with Tracers mode Digitize can auto-trace a curve and with the Scan mode Digitize will simply scan the screen and convert every back pixel to an X,Y point.

Colors...

Helps change the Trace and Blocker colors.

Save Settings

Saves all the option settings to the file DIGITIZE.INI in the /windows directory, these option will become the default every time DIGITIZE is started.. The file also contains the path to the DIGITIZE program location which is used by DIGITIZE to locate the help file. In order to make the path correct make sure that you can call the help file before you save your settings by pressing F1.

Load Settings

Loads the settings from the DIGITIZE.INI file.

Default Settings

Resets the options to the default values but the new settings are not saved in the

DIGITIZE.INI file.


Scan

This option will change the way auto-digitizing is done. When this option is selected pressing on the right mouse button anywhere on the plot will activate the scan. Digitize will then scan the plot and convert every black pixel to an X,Y point (you have to define the axis first). In this scan mode you should have only the information you want scanned on the plot. You can select the Block/Erase option and use the Eraser.

Since this mode is slow, Digitize will yield time to other windows applications and will run in the background. However pressing ESC will terminate the scan.


System

Mouse Tracking

Will open the Windows control panel mouse setup program, the user can then reduce or increase the mouse sensitivity to make the mouse move slower or faster respectively.

Note: this setting will affect all you windows applications.


Help

Here you can get some help ....


Buttons

Define OriginCTX_BTN_DefineOrigin

Define-X

Define-Y

Digitize

Test Trace

Block/Erase

X-Log

Y-Log

Zoom

E/B Size

Tracer

Pixel/Error


Define Origin

Check this box when you want to define the plot origin. The X value of the origin should be in the X= box and the Y value in the Y= box. After setting these values just click on the plot origin.


Define-X

Can be checked only after you defined the origin. Fill in the X= value and click on the plot at the end of the X-Axis.


Define-Y

Can be checked only after you defined the X Axis. Fill in the Y= value and click on the plot at the end of the Y-Axis.


Digitize

The option is automatically selected after you have defined the Y axis. the X= and Y= boxes now show the X,Y values digitized from the plot, clicking on the plot at any point will read the X,Y point to the list box.


Test Trace

This option allows you to use the auto trace without actually reading the points, this is useful in a multiple curve plot where the auto tracer can make mistakes in curves intersections. Observing where the auto tracer missed the correct curve you can than place a trace block at that point.


Block/Erase

This option chan activate the Blocker and Eraser.

The Blocker is activated with by pressing the right mouse button.

And The Eraser is activated by pressing the left mouse button.


Blocker

By selecting Block/Erase option and pressing the left mouse button, you can place a trace blocker at the cursor position. this will put a red point on the plot the auto tracer will not pass through that red point. The blocker size can be changed with the E/B Size scroll bar.

The Blockers are saved and will remain on the screen until cleared by the Edit-Clear All Blockers command. The last Blocker placed can be cleared with the Edit-Clear Last Blocker command.

The color of the Blocker can be changed in the Digitize.ini file by Setting:

BlockColor=integer


Eraser

By Selecting the Block/Erase option and pressing on the right mouse button an eraser will be placed on the plot, By moving the eraser you can erase parts of the plot that interfere with the Trace or Scan mode.

The Size of the eraser can be changed with the E/B Size scroll bar.

Note: Disabling the zoom option will improve the mouse tracking.


X-Log

Select this if  the plot have an X-log axis.


Y-Log

Select this if the plot have a Y-log axis.


Zoom

Sets The magnefaier zoom factor.

The zoom magnification can be changed by moving the scroll bar located on the DIGITIZE window. Once the zoom scroll bar is selected (it will flash), the mouse can be moved to any section on the plot and the zoom power can be changed with the left and right arrow keys, the zoom window will be updated continuously.


E/B Size

Change the Blocker or Eraser size between 1 to 16 pixels.


Tracer

The auto tracer is initiated by positioning the cursor on the curve (must be black) and pressing the right mouse button. The auto tracer will than paint the traced curve green (the default color in DIGITIZE.INI). If the digitize option is set, the points are read to the list box. If the Test Trace option is selected the points are not read.

The X and Y sensitivity of the auto tracer is user controlled via the spinners marked X and Y, generally when you have a spaced curve higher values of the X and Y values are required in order to trace continuously.

As Digitize is being updated new tracing modes are added these modes can be selected from the Options Trace sub menue.

Note: you can also use the Scan mode to Auto-Digitize a plot.

TRACER1

The tracer always start tracing from left to right in the X direction, This tracing mode is not working well for curves with steep slopes. To overcome this problem you can select the options for Y direction tracing, this mode will start a trace in the Y direction when the X direction trace failed. If you select Y-Down a trace in the Y down direction will be tried, if you select Y-Up the Y up direction it used. If you select both DIGITIZE will first try Y-Down direction and when this fails it will try the Y-Up direction.

The last option Repeat will continue an X direction trace after the Y direction fails. You should be caution with this option because DIGITIZE might end up in an infinite loop. If this occurs press the ESC key until DIGITIZE stops tracing.

For Best results, you might have to fine tune the X & Y spinners to values higher than the default.

TRACER2

Tracer2 uses a different algorithm than Tracer1. This algorithm employs an X, Y search and will perform considerably better on non-smooth curves and large slopes. The tracer can be tuned via the Tracer settings just like Tracer1, The Y-Up, Y-Down and Repeat are not used in this mode. Tracer2 results in a less dense trace relative to Trace1.


Pixel/Error

Pixel Option

Checking this option will display the X,Y values in pixels.

Error Option

Checking this option will display the error in the X,Y data. The calculated error  is based on the number of pixels in the plot. For example in the case of a linear axis; the error is the real length of the axis divided by  the length of the axis in pixels (assuming rotation angle=0).

% Option

This will toggle the display between error in percent or as an absolute number.


Remarks

These are some useful remarks for better using DIGITIZE

1.  The DIGITIZE.INI parameters That Can be changed are:

 The Scroll mode jump setting:

XJump=integer

YJump=integer

 The Tracer and Blockers colors in VB QBColor Format:

TraceColor=integer

BlockColor=integer

 The other parameters are changed by DIGITIZE and are written to the file every time you save the settings.

2. If you are not in scroll mode, Windows display resolution might limit the digitizing accuracy.

3. The program calculates the rotation angle of the plot axis relative to the screen grid using the origin values and the X axis values. This means that DIGITIZE attempts to correct plots that are not aligned well which is the normal case with a hand held scanner. However DIGITIZE assumes that the angle between the X & Y axis is 90 degrees.

4. The Auto Tracer is tracing the line by a simple search algorithm, the X and Y searching parameters are user adjustable. The ability of the Auto Trace algorithm to "Jump" over gaps in the curves is getting better as the values of the X, Y trace parameters is bigger.

5. The auto Trace is designed to work with B&W bitmapes only colors other than black might act as Blockers.

6. If you have a slow machine, you can check the NOREFRESH option and the plot will not be refreshed when covered by another windows. To refresh the plot click on the refresh plot button.


Registration

If you use DIGITIZE for more than 30 days (or you liked it much sooner) you should register it by sending $35 to:

Yaron Danon

14 Beman Lane

Troy, NY 12180

A registered user will receive a user code that registers this version of DIGITIZE. This user code will also work with future releases of DIGITIZE.  This enables the registered user to download any future release of DIGITIZE and register it without any communication with the author.

To print a copy of the registration form see the file ORDER.WRI

Please fill in the information:

Name: ___________________________________________________________

Address: _________________________________________________________

_________________________________________________________________

_________________________________________________________________

_________________________________________________________________

Internet: __________________________________________________

User Name:	_______________________________________________

(Used for  registration - Normally your First and Last name)


Responsibility

The author of DIGITIZE is not responsible to any damage done by DIGITIZE to your computer. The author is not responsible to any damage caused by using the digitized data.


Revisions

History

Version 0.98

 First release.

Version 0.99

 Change to 3D interface.

 Add trace block.

 Fix bugs in Sample menu.

 Fix minor bugs.

Version 1.0

 Add zoom window.

 Correct some bugs in file save and load.

Version 1.1

 Add Copy X,Y.

 Add delimiters to X,Y list Box.

 Add refresh list option.

Version 1.15, December 1992

 Change to VB. 2.0

 Save Options to DIGITIZE.INI

 Save Help file path in DIGITIZE.INI.

 Blcokers are now saved until cleared.

Version 1.2, January 1993

 Add Scroll mode. This enables DIGITIZE to work at the bitmap accuracy with any display resolution.

 The Code can be registered by the user (with a given code for the author)

Version 1.25 January 1993

 Add toolbar.

 Add Y Trace modes. (Solves the trace problem of steep curves)

 Add Tracer and Blocker colors to DIGITIZE.INI

Version 1.26 March 1993

  Add variable blocker size.

  Improve Help File.

Version 1.3 March 1993

 Add Error indication on digitized plots.

 Add Clear Selected Data option to the Edit menu.

 Add Scan Mode.

 Add Eraser.

Version 1.35 March 1993

 Add new trace mode. (Trace2)

Version 1.36 April 1993

 Fix a bug in reset parameters.

Version 1.38 May 1993

 Add sort to the Data menu.

 Add Colors to the option menu.

Future Possible Improvements

 Plot points back on the picture.


Comments and Suggestions

Please Mail or E-mail and suggestion or problems you have to:

Yaron Danon

14 Beman Lane

Troy, NY 12180

USA

danony@rpi.edu


WinFit

Also available is WinFit:

A general purpose Non Linear Weighted Least Squares Fitting program for windows 3.x

This program was uploaded to ftp.cica.indiana.edu as winfit10.zip. A new version might also be arround soon.

FEATURES

 Reads a simple ASCII file, space or tab delimited of X Y with an optional Y Error data.

 The data can be plotted with log axis options.

 The program uses Levenberg-Marquardt fitting method.

 Fitting algorithm is implemented in a DLL for faster code execution.

 There are some built in functions and the a user-defined function.

 The program can generate weights that will improve fitting performance for some problems.

 This version can read up to 5000 data points and fit up to 10 parameters.

 The program provides a REPORT file and the plot can be copied to the clipboard.

 The program will calculate and display the COVARIANCE and CURVATURE matrixes

 Available now (May 93)  is version 1.22 can fit up to 5000 data points and have many additional improvements.