Accusoft.ISISXpress7.Net
Overview of ISIS Xpress

Basic Scanning

There are only a few steps required for basic scanning; initiating the ISIS Xpress control, creating the ISIS Xpress object, setting the output path and filename, and invoking the ScanSingle method.
IsisXpress isis = new IsisXpress();
isis.Output.Filename = "C:\temp\image.tif";
isis.Scanner.ScanSingle();

Scanner Settings

ISIS Xpress also provides properties for scanner settings and naming schemes for batch scanning. 
All settings are accessed based on the value of the Setting.ScanSetting property. This property uses the ScanSettingInfo enumeration which has the following values:
 

XResolution = 0,
YResolution = 1,
PageSize = 2,
Brightness = 3,
Contrast = 4,
XPosition = 5,
YPosition = 6,
ImageWidth = 7,
ImageLength = 8,
ResUnit = 9,
Source = 10,
ScanAhead = 11,
ScanAheadMaxPages = 12,
ScanAheadPages = 13,
SamplesPerPixel = 14,
BitsPerSample = 15,
AdvancedTag =16

This property must be set before a scanner setting can be queried or set.
The following code could be used to set the scanner mode to 256-level gray scale.
isis.Scanner.Setting.ScanSetting = ScanSettingInfo.SamplesPerPixel; 
isis.Scanner.Setting.Long = 1;
isis.Scanner.Setting.ScanSetting = ScanSettingInfo.BitsPerSample; 
isis.Scanner.Setting.Long = 8;

The following code could be used to set the Brightness for the scanner.

isis.Scanner.Setting.ScanSetting = ScanSettingInfo.Brightness; 
isis.Scanner.Setting.Long = 23;

Not all settings have an integer setting such as Brightness. The ScanSettingInfo.PageSize property is usually a string and must be set with the Setting.StringValue property. For Example:

isis.Scanner.Setting.ScanSetting = ScanSettingInfo.PageSize; 
isis.Scanner.Setting.String = "scanner’s maximum";

The Setting.DataType property can be used to determine the setting type. This property uses the DataTypeInfo enumeration which has the following values.

RangeLong = 0,
ListLong = 1,
ListString = 2,
String = 3,
Long = 4,
Rational = 5,
ListRational = 6,
RangeRational = 7

Scanner settings can vary widely between different kinds of scanners. For this reason it is important to know what values are legal for a particular setting. ISIS® Xpress provides several properties to query the available choices for a setting.

If the Setting.DataType property equals RangeLong or RangeRational for a setting, then the following properties are used to determine what range of values is legal.

For Long values:

Setting.RangeMinimumLong
Setting.RangeMaximumLong

For Rational values:

Setting.RangeMinimumRational
Setting.RangeMaximumRational

Any value between and including the Min and Max values can be set to the Setting.LongValue or  Setting.RationalValue property for this setting. A Long range of choices is the typical Setting.DataType for the following scanner settings:

ScanSettingInfo.Brightness
ScanSettingInfo.Contrast
ScanSettingInfo.XPosition
ScanSettingInfo.YPosition
ScanSettingInfo.ImageWidth
ScanSettingInfo.ImageLength
ScanSettingInfo.ScanAhead
ScanSettingInfo.ScanAheadMaxPages

If the Setting.DataType property equals DataTypeInfo.ListLong, DataTypeInfo.ListString, or DataTypeInfo.ListRational, then the possible values for the setting are contained in a list and can be queried with these properties:

Setting.ListLong
Setting.ListString
Setting.ListRational

Setting.ListLong, Setting.ListString, and Setting.ListRational are property arrays where the Index value can be from 0 to Setting.ListCount – 1. Setting.ListLong or Setting.ListString are the typical Setting.DataType for the following scanner settings:

ScanSettingInfo.XResolution
ScanSettingInfo.YResolution
ScanSettingInfo.PageSize

Advanced Tags

The component supports Advanced Tags, which offers developers great flexibility in utilizing scanner specific features. These are scanner processing instructions which are provided as parameters passed as tag values to the control, and consequently passed directly through to the scanner. Assuming the correct tags are passed to the scanner, they will instruct the scanner what actions to take. See ISIS Tags by Name.

The following methods and properties are used with advanced tags:

Methods:

LongDefault - Gets a long value at the specified index in the list of long values for the default scan setting.

RationalDefault - Gets a rational value at the specified index in the list of rational values for the default scan setting.

StringDefault - Gets a string value for the default scan setting.

Properties:

Advanced - Gets and sets the advanced tag number.

Batch Scanning

ISIS Xpress provides the Scanner.ScanBatch method for batch scanning. Scanners that have a document feeder will scan until the feeder is empty or until the Scanner.Cancel method is called. ISIS Xpress will generate a FeederEmpty event when the feeder is empty. ISIS Xpress also generates a Scanning and Scanned event for each page that is scanned. The Scanning event can be used to modify the filename before the scan takes place. Scanners without a document feeder trigger a FeederEmpty event before each page is scanned, allowing the user to cancel the operation.

After issuing the Scanner.ScanBatch method, ISIS Xpress will continue to scan images for the device until the StopScan parameter of the FeederEmpty event is set to true or the method Scanner.Cancel is called. The FeederEmpty event is the correct place to pop up a dialog or message box asking the user to load the scanner, cancel the operation, load a new batch, etc.

Naming Schemes

ISIS Xpress provides properties to generate filenames for use with batch scanning. The following properties are used:

Output.UseSchema
Output.Root
Output.Directory
Output.FileSchema

The Output.UseSchema property must be set to true before ISIS Xpress will generate filenames. Once set to true, the other properties are used to generate a file name. For example, if you want the filenames to be C:\Docs\File001.tif, C:\Docs\File002.tif, etc., these are the correct settings:

Output.Root = "File";
Output.Directory = "C:\Docs";
Output.FileSchema = "$###" ;

For the Output.FileSchema property, the "$" symbol represents the Output.Root, and the "#" represents the page number. The number of #’s used determines the number of leading 0’s to use in the filename. For example, "$##" generates File01.tif, while "$####" generates File0001.tif. Any extra $ symbols are ignored; "$###" is equivalent to "$$$###".

During batch scanning, a Scanning event is fired before each page is scanned. At this time the Output.Filename property will be equal to the filename used for that page. The user can change the Output.Filename property at this time if desired.

Memory Images

ISIS Xpress can generate a memory image at the time of scanning by setting the Output.CreateDib property to true. If this property is set to true, the image becomes valid in the Scanned event. The image can then be obtained using the ToHdib, ToHBitmap or ToBitmap methods and passed to another control such as Accusoft ImagXpress. It is possible to only use memory images by setting the image to true and the Output.CreateFiles property to false. In this case, nothing is saved to disk, only to memory. This can provide faster operation if you wish the user to be able to view and modify the image before saving. In such a case, you would pass the image to the ImagXpress control, and then the ImagXpress control would save the file after acceptance.

The image can only be read once per scan. Subsequent reads will throw a DibUnavailableException.

Dependencies

There are a number of EMC Corporation's ISIS PixTools files that must be installed according to the target system. There is a Support subdirectory in the directory where ISIS Xpress was installed. The Support subdirectory contains two subdirectories that include all the necessary EMC Corporation's ISIS PixTools files. The directories are:

PixTran – Install these files to the %WINDIR%\pixtran directory.
Sysdir – Install these files to the %SYSTEM32% directory.

The above files should be installed in the specified order.

 

 


©2018. Accusoft Corporation. All Rights Reserved.

Send Feedback