[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
object oriented dilemma
- Subject: object oriented dilemma
- From: Jason Li <jylimd(at)yahoo.com>
- Date: Mon, 09 Oct 2000 16:47:07 -0400
- Newsgroups: comp.lang.idl-pvwave
- Organization: University of Maryland College Park
- User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.02.2022
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:21651
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()}
END
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?
thanks
Jason