[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

object oriented dilemma

Dear fellow IDL lovers,

If I want to write an image processing software using OOP method, I would
normally define a structure in __define module:

PRO myProgram__define
    struct = {imagePointer:Ptr_New()}

Traditionally, a pointer is used to take care of variable image size. Then
load an image to self.imagePointer in the myProgram__init module.

hugeImage = bytarr(huge, huge)
self.imagePointer = Ptr_New(hugeImage, /no_copy)

Now in my METHOD modules, I have to perform an operation on line by line
basis. I don't know how to get a line data out of this self.imagePointer
without making a copy (dereferencing) of it first. My image size is rather
large. I don't how to be more memory efficient.

Question: What is the solution to this?