Using ImageJ extension from OAD Python script

Everything OAD-related that won't fit in the other categories: share general aspects of macro programming and discuss the OAD environment
Post Reply
user-5582
Posts: 2
Joined: Thu Jan 01, 1970 1:00 am

Using ImageJ extension from OAD Python script

Post by user-5582 »

Is it possible to call out to ImageJ (using the included Zeiss.Micro.ImageJPlugIn) from an OAD Python script?

When using the macro recorder, it adds only the following:

# Could not record function '__ImageJMacro__'. The function is not available in Simple Interface or has a different name.

Any suggestions would be appreciated.

Mike
user-4
Posts: 397
Joined: Thu Jan 01, 1970 1:00 am

Post by user-4 »

Dear mdboom,

sorry, but the ImageJ plugin cannot be addressed by an OAD macro.

At the top of the page on the right hand side you can find ‘Advanced Search’.
Enter ‘ImageJ’ and press return. You will find some contributions to this subject.

Please don’t hesitate to come back if you cannot find what you need.
user-5582
Posts: 2
Joined: Thu Jan 01, 1970 1:00 am

Post by user-5582 »

I was hoping to integrate an existing ImageJ plugin into the pipeline, but it's not critical that it remains in ImageJ.

Stepping back, what are the best alternatives for calling out to do some custom image processing and statistics gathering at the pixel level? The embedded IronPython doesn't have Numpy, so is likely not efficient enough to just do this there. Is it possible to call out an extension in C or C# from OAD? I can't seem to find documentation on developing compiled Zen extensions (such as the ImageJ extension) -- is that available? And are extensions in general callable from OAD, or is that restriction not limited to the ImageJ plugin?

Mike
user-4
Posts: 397
Joined: Thu Jan 01, 1970 1:00 am

Post by user-4 »

Is it possible to call out an extension in C or C# from OAD?
This is a very important point of the OAD concept!
In a macro you can import any .Net DLL and use it.

Example:
from System.IO import File, Directory, FileInfo
After this line of code is executed, the .Net classes for File, Directory and FileInfo can be used within your macro.
So you can use e.g. File.Exists() to check if a file exists at a certain location.

In other words.
You can use VisualStudio or SharpDevelop to generate your own .Net DLLs.
These DLLs can be imported and used by a macro just as any other (.Net Microsoft) DLL.

I would like to recommend writing your own DLL before you intend to write a ZEN Extension, as extensions are more complex.
Post Reply