How to use a "package" within a function?

Hi,

I'm working on an Igor procedure in which a package "Append Image or Fill Between Contours" needed to be called. I was wondering if this is possible in this stage.

Many thanks :)
Some packages are designed for the possibility of being used by programmers, and some are not. That one appears to be one that really isn't.

Having said that, you can view the code that does the work by choosing Windows->Procedure Windows->AppendImageToContour.ipf. Then you have two choices: 1) figure out how to call WMCreateImageForContour(). 2) Copy the code from WMCreateImageForContour() that does the work and adapt it to your need.

If you choose 1), you should be aware that we sometimes alter procedure files when we make enhancements. That could break your code. Option 2) is harder and safer.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
johnweeks wrote:
Some packages are designed for the possibility of being used by programmers, and some are not. That one appears to be one that really isn't.

Having said that, you can view the code that does the work by choosing Windows->Procedure Windows->AppendImageToContour.ipf. Then you have two choices: 1) figure out how to call WMCreateImageForContour(). 2) Copy the code from WMCreateImageForContour() that does the work and adapt it to your need.

If you choose 1), you should be aware that we sometimes alter procedure files when we make enhancements. That could break your code. Option 2) is harder and safer.


Calling WMCreateImageForContour() is just fine, actually.

Even though this procedure file will be replaced by a much-improved version in the next release of Igor, the current version of WMCreateImageForContour() will continue to be shipped with Igor.

(In Igor 6.23 FillBetweenContours.ipf, which has a spiffy new panel-based design, will be called from Graph->Packages->Fill Between Contours, in place of the current Append Image or Fill Between Contours menu item.)

--Jim Prouty
Software Engineer, WaveMetrics, Inc.
Thanks John and Jim!
Calling WMCreateImageForContour() works just fine and my problem is solved :)
Waiting for the next release (I use this contour function quite often).