Unfortunately, the answer is yes, and that’s what we do in many cases in :cvb: functions. VPAT access is by and large the most versatile way of accessing image data, but (as pointed out earlier) by far not the fastest. On the other hand, code that relies on a linear arrangement of the pixel data (i.e. GetLinearAccess
returns true
when called on the image) may sooner or later run into a situation where this assumption is violated and fail.
As a rule of thumb: If you are working directly on image data delivered by your camera or frame grabber, then you’re not very likely to see the linear accessibility assumption violated as practically all relevant images sources yield images with linear data arrangement (prominent exception is the RotateImage
ini file setting of many :cvb: drivers - see here). As soon as you start working on preprocessed images you should be more alert and at least make sure that your code doesn’t explode in your customer’s face when confronted with nonlinear VPATs.