Hexagon Geospatial
MENU

Developer Discussions

Discuss topics with other Hexagon Geospatial Power Portfolio developers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Occasional Contributor
Posts: 8
Registered: ‎03-21-2019
Accepted Solution

How to integrate / call a plugin in imagine

[ Edited ]

Hi,

 

First of all, sorry if these are very basic questions. I'm new to the development for ERDAS imagine but after reading the docs and trying, there are several subjects that I don't understand in all its extension.

 

So I've run through all the examples of Modeler SDK and I succesfully coded and compile one "hello world" very simple plugin. At the end of the day, it is a dll with a xml to help imagine call the code inside the library.

 

I looked everywhere, but I couldn't find documentation or examples on how to integrate this:  Where to copy these files, how to call them from Imagine?

 

I am also confused by the fact that it exists an SDK for Imagine (already marked as obsolete) and another for Spatial Modeler. If i understood it correctly, the Spatial Modeler one is the better option, but then again, will it run when called from Imagine environment? Are there other considerations to make this work?

 

Thanks,

Technical Evangelist
Posts: 53
Registered: ‎09-16-2015

Re: How to integrate / call a plugin in imagine

Hi, Eloy Alfonso!

 

Welcome to the Spatial Modeler SDK!

 

The information about where to copy your DLL and XML files is in the Spatial Modeler Guide under "Extending Spatial Modeler".  The Guide is included as a PDF with the SMSDK.  When you install the SMSDK it makes a link in your Windows Start menu to the Spatial Modeler Welcome page included with the SMSDK.  This page has a link to Spatial Modeler Guide PDF in section 2.1.  The Spatial Modeler Guide is also broken into posts here on the Community.  The "Extending Spatial Modeler" section is https://community.hexagongeospatial.com/t5/Developers-Knowledge-Base/Extending-Spatial-Modeler/ta-p/...

 

The Spatial Modeler SDK is what you want to use to extend Spatial Modeler in any environment where Spatial Modeler is used, including ERDAS IMAGINE.  We are deprecating the IMAGINE Developers Toolkit in favor of the Spatial Modeler SDK.

 

Best regards,

 

Ruth

Occasional Contributor
Posts: 8
Registered: ‎03-21-2019

Re: How to integrate / call a plugin in imagine

Hello Ruth,

 

Thank you for your answer.

 

What I don't see is how to integrate the new functionality in the Menus of Imagine.

 

For example, we would like to add support for a new sensor modelisation to the list showed in "Raster"->"Geometric Calibration"->"Calibrate with Sensor Model and Terrain". There is some metadata provided by other sources to add to the image, and so the desidered functionality will be add a new entry in "Set Geometric Model" window for our particular model, and then, when selected, call the dll to begin the process for doing this.

 

How can I modify this list? How can I tell Imagine which dll to call when that particular model is selected?

 

Thanks,

 

Eloy

Staff
Posts: 3
Registered: ‎10-09-2015

Re: How to integrate / call a plugin in imagine

Eloy,

 

To add a new sensor model to the Geometric Calibration in IMAGINE, you have to do the following:

  1. Develop a GeomodelInterfaces DLL using c++ and copy it to ..\usr\lib\x64URelease\GeomodelInterfaces
  2. Develop a GeometricModels DLL using c++ and copy it to ..\usr\lib\x64URelease\GeometricModels
  3. Start IMAGINE, run "Reconfigure Geometric Methods" under File -> Configuration, and re-start IMAGINE.

There are API documentation and sample codes available in IMAGINE Developers' Toolkit. However, the IMAGINE Developers' Toolkit 2018 is the final release of the toolkit. Current SMSDK does not include the documentation and samples about how to add a new sensor model. We are soliciting inputs from the users of IMAGINE Developers' Toolkit. Please check out this page to provide your input.

 

Thanks.

 

Xinghe

Occasional Contributor
Posts: 8
Registered: ‎03-21-2019

Re: How to integrate / call a plugin in imagine

Xinghe,

 

Thanks for your answer. I will take a look to the Imagine developers toolkit and try to use it for our purposes then.

 

However, and seen that SMSDK is the future, I would like to ask about its roadmap: Is it going to add support for integration with Imagine? When would this be expectable? In the next months?

 

Thanks,

 

Eloy

Staff
Posts: 3
Registered: ‎10-09-2015

Re: How to integrate / call a plugin in imagine

Eloy,

 

Due to the task load the engineers have here, we set the task priorities based on the input from our customers and stakeholders. Therefore, it is important to get on this page to provide your input. Currently no input is provided regarding the API documentation (and/or sample code) for adding new sensor models to IMAGINE using SMSDK. It is not yet on the planning board till there are enough interests.

 

Thanks.

 

Xinghe

Occasional Contributor
Posts: 8
Registered: ‎03-21-2019

Re: How to integrate / call a plugin in imagine

[ Edited ]

Thanks. I will try to write to summarize our needs and write them there.

 

In the meantime, I wrote one DLL class for the GeomodelInterface and another for GeometricModels. I compiled, copied them to usr/lib/x64uRelease GeomodelInterfaces and geometricmodels. After that, I click in "Reconfigure Geometric Methods".

 

After a while, the process is finished but I don't see my Model in the list showed in "Geometric Calibration"=>"Calibrate with Sensor Model and Terrain".

 

Is there a log generated by the process somewhere? How can I know what is blocking the new .dlls to be added to the list?

 

Thanks,

 

Edit to say that I found the log, and the problem in it:

 

09/05/19 15:55:48 SessionMgr(4656): ERROR: InstanceTitleListGet missing from GeomodelInterfaces|C:/Program Files/Hexagon/ERDAS IMAGINE 2018/usr/lib/Win32Release/GeomodelInterfaces/pier.dll|pier: DLL ignored

 

So it is not finding the InstanceTitleListGet in the interface class.

Do you need immediate support?
Please submit a Ticket through our
Development Ticket Portal.