Description

Fired by McImage.ImportProperties before doing the property import

Syntax

Private Sub object_BeforeImportProperties(Image, SourceImage, ImportFilter)

The BeforeImportProperties Event syntax has these parts:

PartDescription
objectA McImage object.
ImageA McImage object.

The McImage into which properties are being imported.

SourceImageA McImage object.

The McImage from which properties are being copied.

ImportFilterA mcImportPropertiesFlags enumeration, as described in settings.

Flags specifying which properties are to be copied. On entry to the event, this argument will hold what was specified as the ImportFilter argument to the ImportProperties call. The event handler may change the flags to import a different set of properties. Setting ImportFilter to mcipfNone will cause no properties to be copied, and will result in no AfterImportProperties event being fired.

Settings

The settings for ImportFilter are:

ConstantValueDescription
 mcipfImage4096

Import standard McImage properties.

 mcipfUserProperties8192

Import public McImage.Properties (in default name space).

 mcipfLookupTables16384

Import McImage.LookupTables.

 mcipfPseudoColor32768

Import McPseudoColor.

 mcipfSpatialCalibration65536

Import McImage.SpatialCalibration.

 mcipfIntensityCalibration131072

Import McImage.IntensityCalibration.

 mcipfColorMap262144

Import McImage.ColorMap. Ignored if the image is not indexed color.

 mcipfNoEvent8388608

Suppress the BeforeImportProperties and AfterImportProperties events.

 mcipfBWBestFit16777216

Set a best fit display range when importing lookup tables.

 mcipfBWTrueRange33554432

Set the display range to the actual dynamic range.

 mcipfAll520192

Import all properties and attributes, do not suppress events.

 mcipfAllExceptSpatial454656

Import all properties not spatially related. Useful if the image is resized.

 mcipfAllExceptIntensity389120

Import all properties not intensity related. Useful if the image is converted.

 mcipfDefault12288

Import a minimal set of properties, image and user properties only. Useful if the image is related to the original image, but not closely.

 mcipfNone0

Suppress importing any properties. Will still fire event unless mcipfNoEvent is also specified, in case someone handling events wants to copy some properties.

 mcipfMask268431360

All existing flags combined together.

Remarks

This event is designed to give clients an opportunity to control what properties are copied from a source to a destination image, when they do not have access to the ImportProperties call. This situation occurs infrequently, however as most image creation methods supply a Flags argument that can hold mcImportPropertiesFlags bits.

Note that this event will not be fired if the ImportProperties method is called with an ImportFilter argument with the mcipfNoEvent flag set.