[OpendTect_Developers] Remote horizon seed picking

Jaap Glas jaap.glas at dgbes.com
Fri Nov 30 13:48:40 CET 2012


Dear David,

When I look at these two snippets send by you, I have some doubts.

 > //try to get the first tracker
 > MPE::EMTracker* tracker = engine.getTracker(0);

 > Unfortunately, I then get the following error message in a pop-up window:
 > "Tracking Setup has different attributes than your seeds"

Are you sure that by getting the first tracker, you actually have the
right tracker for your horizon. It could be one of the reasons why
you are getting this error message. Checking the code of the function
uiMPEMan::getSelectedTracker(), it seems you are oversimplying.
However, if there is only one tracker in this experiment, it can't
be the reason.

 > I want to use the same selection specs for this point as the tracker already
 > has. My question now is how I can apply/set this.

In my opinion, you want to use the same selection specs for this point
as those displayed by the plane on which you make the pick, so that
OpendTect can prevent you from accidentally picking on the wrong
attribute.

Within OpendTect, the Attrib::SelSpec given to the seedpicker is
retrieved from the visSurvey::PlaneDataDisplay on which the pick
as been made: plane->getSelSpec(attrib). Have a look at how this
is done in function MPEClickCatcher::clickCB(CallBacker*).

The MPEClickCatcher will pass it to the uiMPEMan class, which
gives it to the seedpicker: seedpicker->setSelSpec( clickedas ).
as in the function uiMPEMan::seedClick(CallBacker*).

If you insist on circumventing all the control mechanisms,
I think it is possible to obtain the SelSpec expected by the
tracker, and fool the seedpicker with that. Something like:

const MPE::SectionTracker* sectiontracker = tracker->getSectionTracker(0);
const Attrib::SelSpec* selspec = sectiontracker->adjuster()->getAttributeSel(0);
seedPicker->setSelSpec( selspec );

For testing, you can also switch the seedConnectMode of the seedpicker to 
DrawBetweenSeeds temporarily. No SelSpecs should be required in this mode.
However, in the end you want to track on attributes of course.

 > Or is there another way to do achieve the adding of remote horizon seed points?

May be with a totally different approach. I am thinking for example of
having a 2D Viewer window from OpendTect displayed indirectly onto a
remote console. However, the challenge is at a completely different
system level. It is about how to get a window image one way and the
tablet events the other way. Not that I can tell you how to do that,
but it would enable having lots of other things, like the tracking,
done by OpendTect automatically.


Best regards,

Jaap Glas

-- 
-- dr. Jaap C. Glas
-- Software Engineer
-- dGB Earth Sciences
-- Nijverheidstraat 11-2
-- 7511 JM Enschede, The Netherlands
-- jaap.glas at dgbes.com
-- http://www.dgbes.com
-- Tel: +31 534315155, Fax: +31 534315104


On 11/29/2012 12:57 PM, David d'Angelo wrote:
> Hi folks,
>
> I am working on a plugin, which remotely adds seed points to the active horizon
> tracker.
> When receiving a pick point from the remote software, I am doing to following
> (hack to check the idea):
>
> //Transform the point into the UTM coordinate system
> Coord3 utmPos = convertICLToUTM(iclPos) //custom function
> //try to get the first tracker
> MPE::EMTracker* tracker = engine.getTracker(0);
> //cast it to a horizon3d tracker
> MPE::Horizon3DTracker * horizon3dTracker = dynamic_cast<MPE::Horizon3DTracker
> *>(tracker);
> //get the seed picker
> MPE::EMSeedPicker * seedPicker = horizon3dTracker->getSeedPicker();
> //add the seed
> seedPicker->addSeed(utmPos);
>
> Unfortunately, I then get the following error message in a pop-up window:
> "Tracking Setup has different attributes than your seeds"
>
> I want to use the same selection specs for this point as the tracker already
> has. My question now is how I can apply/set this.
> Should I use something like:
> seedPicker->setSelSpec( clickedas );
> If so, how do I get the current active SelSpec.
>
> Or is there another way to do achieve the adding of remote horizon seed points?
>
> Thanks in advance.
>
> Cheers,
> David
>





More information about the Developers mailing list