Description

A read-write property giving the length of each sample when the SampleMode is mclpsmFixedSampleLength.

Property type

A Double value.  

Syntax

object.LengthPerSampleDesired [= value]

The LengthPerSampleDesired Property syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McLineProfiles.
valueA Double value.

Remarks

This property is assigned and exposed in calibrated units if the CalibratedLength property is True and the ancestor McLines or McRegions' McFeatures.SpatialCalibration property is set or the ancestor McImage.SpatialCalibration property is set.

When SampleMode is mclpsmFixedSampleLength, each line feature is broken into as many sections as possible of LengthPerSampleDesired length along each line feature. The last (or only) sample may be (and usually is) smaller than LengthPerSample. The ProfileValues array for each line feature will have a varying number of profile sample values and the NumberOfSamples property array will show that number for each feature. In this mode, the LengthPerSample property array values will be the length of the last sampled segment only for each line feature (all other sampled segments will be of length equal to the LengthPerSampleDesired property).

Which ever SamplingMode is in force, the actual sampling algorithm for a single sampled segment is the same and depends only on its sampled length in pixel units. If the length of each sample, L, is greater than 1.0 pixels, then multiple luminance values are taken at equal intervals within the section and averaged. The number of values averaged is ceil(L). Luminance values are evenly placed about the center point of sections, and then each value is interpolated from the four nearest pixels (i.e., sub-pixel interpolation is used). If the VirtualWidth property is greater than 1.0, then each value will be made by averaging values along a perpendicular to the value point.

LengthPerSampleDesired is 1.0 pixels by default. Since the default SampleMode is mclpsmFixedSampleLength, samples will be this length, by default.

Exceptions

Zero and negative values are illegal, but there is no upper limit. When SampleMode is mclpsmFixedSampleLength, the last sample will always end at the end of the line, so very large values will effectively result in one sample per line.