Based upon Peer's initial description:
I am thinking that the "intensity-to-points-array" should be done from a 2d CPlane.
Convert CPlane local coordinates over the image, into pixel (row,column) address of the canvas image.
World coordinates just complicate the script.
At the end of the script, the CPlane can be reset.
The reason for this is that the 2d image can be in any view, for example Top, Front, Right, etc.
Or even at some other angle. The ( X, Y ) coordinate of a local point is to be converted to a pixel address.
World coordinates could introduce z into the (x,y) mix, and mess up the conversion to pixel address.
For example, Front view is 2d world ( x, z ), but local ( X, Y ), with Z = 0, or Z = constant.
Right view is 2d world ( y, z ), but local ( X, Y ), with Z = 0, or Z = constant.
?
- Brian
I'll make the assumption that the canvas image is the same "resolution" as the primary (e.g. PNG) image.
I guess that the canvas image is somewhere in memory, not a MoI geometry object. (?)
The method to ghet the 2d CPlane of an image was given by Michael, I think.
So divide the local image by columnNum zones, along X,
and divide the local image by rowNum zones, along Y.
(Convert real number X, Y coordinates into integers for each zone...)
Reverse Y coordinates for rowNum to be zero at upper left corner.
|