Description

This method imports selected properties from a source image.

Return Type

None  

Syntax

object.ImportProperties SourceImage, [ImportFilter]

The ImportProperties Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McImage.
SourceImageRequired. A McImage object.

The image to import data from.

ImportFilterOptional. A mcImportPropertiesFlags enumeration, as described in settings.

Controls what is going to be imported.

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 method is called automatically for many operations that create new images. Most of these methods take a Flags parameter of type mcImageCreateFlags, into which can be Or'ed mcImportPropertiesFlags to specify which properties, if any are to be copied from the source to the destination.

A few methods give you no control over which properties are copied (e.g., Duplicate where the ImportFlags are mcipfAll). In these cases, if you really need to change the properties copied, you may handle the DMcImageEvents.BeforeImportProperties event and substitute your own ImportFilter argument. However, it will almost always be easier to just call the general-purpose CopyToNewImage method, which gives you a great deal of control over the copy.

Incompatible properties are ignored and don't cause the method to fail.