Accusoft.ISISXpress7.ActiveX
Overview of ISIS Xpress
There are only a few steps required for basic scanning; setting the output path and filename, and invoking the ScanSingle method.
ISISXpress.FileName = "C:\temp\image.tif"
ISISXpress.ScanSingle ()

Scanner Settings

ISIS® Xpress also provides properties and methods for scanner settings and naming schemes for batch scanning. 

All settings are accessed based on the value of the ScanSetting property. This property uses the ISX_ScanSetting enumeration which has the following values:

ISX_XResolution = 0,
ISX_YResolution = 1,
ISX_PageSize = 2,
ISX_Brightness = 3,
ISX_Contrast = 4,
ISX_XPosition = 5,
ISX_YPosition = 6,
ISX_ImageWidth = 7,
ISX_ImageLength = 8,
ISX_ResUnit = 9,
ISX_Type = 10,
ISX_ScanAhead = 11,
ISX_ScanAheadMaxPages = 12,
ISX_ScanAheadPages = 13,
ISX_SamplesPerPixel = 14,
ISX_BitsPerSample = 15,
ISX_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.
ISISXpress.ScanSetting = ISX_ScanSetting.ISX_SamplesPerPixel
ISISXpress.SettingLong = 1
ISISXpress.ScanSetting = ISX_ScanSetting.ISX_BitsPerSample
ISISXpress.SettingLong = 8

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

ISISXpress.ScanSetting = ISX_ScanSetting.ISX_Brightness
ISISXpress.SettingLong = 23

Not all settings have an integer setting such as Brightness. The ISX_ScanSetting.ISX_PageSize property is usually a string and must be set with the SettingString property. For Example:

ISISXpress.ScanSetting = ISX_ScanSetting.ISX_PageSize
ISISXpress.SettingString = "scanner’s maximum"

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

ISX_RangeLong = 0,
ISX_ListLong = 1,
ISX_ListString = 2,
ISX_String = 3,
ISX_Long = 4,
ISX_Rational = 5,
ISX_ListRational = 6,
ISX_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 DataType property equals ISX_RangeLong or ISX_RangeRational for a setting, then the following properties and methods are used to determine what range of values is legal.

The properties for Long values:

RangeMinimumLong
RangeMaximumLong

The methods for Rational values:

RangeMinimumRational
RangeMaximumRational

Any value between and including the minimum and maximum values can be set to the SettingLong property or SettingRationalSet method for this setting. A Long range of choices is the typical DataType for the following scanner settings:

ISX_ScanSetting.ISX_Brightness
ISX_ScanSetting.ISX_Contrast
ISX_ScanSetting.ISX_XPosition
ISX_ScanSetting.ISX_YPosition
ISX_ScanSetting.ISX_ImageWidth
ISX_ScanSetting.ISX_ImageLength
ISX_ScanSetting.ISX_ScanAhead
ISX_ScanSetting.ISX_ScanAheadMaxPages

If the DataType property equals ISX_DataTypeInfo.ISX_ListLong, ISX_DataTypeInfo.ISX_ListString, or ISX_DataTypeInfo.ISX_ListRational, then the possible values for the setting are contained in a list and can be queried with these methods:

ListLong
ListString
ListRational

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

ISX_ScanSetting.ISX_XResolution
ISX_ScanSetting.ISX_YResolution
ISX_ScanSetting.ISX_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 ScanBatch method for batch scanning. Scanners that have a document feeder will scan until the feeder is empty or until the 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 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 Cancel method 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:

UseSchema- Gets and set a naming schema for batch scanning.
Root - Gets and sets the root prefix used to generate filenames during a batch scan.
Directory - Gets and sets the base directory used for the file naming schema during batch scans.
FileSchema - Gets and sets the file schema used to generate filenames during batch scanning.

The 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:

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

For the FileSchema property, the "$" symbol represents the 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 Filename property will be equal to the filename used for that page. The user can change the Filename property at this time if desired.

Memory Images

ISIS Xpress can generate a memory image at the time of scanning by setting the CreateDib property to true. If this property is set to true, the hDib property becomes valid in the Scanned event. The hDib property can then be passed on to another control such as Accusoft ImagXpress. It is possible to only use memory images by setting the CreateDib property to true and the 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 hDib property to the ImagXpress control, and then the ImagXpress control would save the file after acceptance.

The hDib property can only be read once per scan. Subsequent reads will return a 0. If you wish to check this property before setting it, load it into a temporary variable first.

For example:

Long Temp = ISISXpress.hDib;
if  (Temp != 0)
{
    ImagXpress.hDib = Temp;
}

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:

The above files should be installed in the specified order.

 

 


©2014. Accusoft Corporation. All Rights Reserved.

Send Feedback