[OpendTect_Developers] Data access & Seed point generation
Jaap Glas
jaap.glas at dgbes.com
Tue Nov 20 15:59:26 CET 2012
Dear David,
A few answers to your questions:
> I am working on plugin, which connects the visualization of 2D seismic lines
> in OpendTect with Android tablets.
Considering the fact you are calling PlaneDataDisplay, I assume that with
"2D lines" you do not (or not only) mean the lines in a 2D survey, but the plane
inlines, crosslines and timeslices in a 3D survey?
> 1) I need to get the image data out of the 2D Seismic lines. I used the
> visBase PlaneDataDisplay class to access the underlying:
> PlaneDataDisplay * pd = ...;
> SbVec3i32 size;
> int bytesPerPixel;
> unsigned char* data =
> pd->getChannels()->getChannels()->getValue(size,bytesPerPixel);
> I get the data, however the dimensions are looking strange.
> What format does the image have? 8bit grayscale?
The image you get like this is 8bit greyscale, but this is probably
not the image you want. It is the mapping of the attribute values
of the planes first attribute onto a 0-255 range. What you probably
want is the RGBA texture image as you would see it in your scene
or in a 2D viewer. This is built by the hardware shader from one
or more of these 8bit greyscale images and one or more color maps.
See: visBase/vistexturechannel2rgba.h:
virtual bool createRGBA(SbImagei32&);
so the code should probably be something like this:
SbImagei32 img;
pd->getChannels()->getChannels()->createRGBA( img );
unsigned char* data = img.getValue(size,bytesPerPixel);
> 2) I want to be able to remotely add seed points for horizon tracking. Does
> anybody have an idea of how to do this without faking mouse events?
The usual entrance for this is the Horizon3DSeedPicker class.
See: MPEEngine::horizon3dseedpicker.cc
bool addSeed(const Coord3&,bool drop);
This coordinate is in world coordinates, so there is some transformation
work to do. You guess you have study how OpendTect itself is passing its
mouse events from visBase::EventCatcher via visSurvey::MPEClickCatcher
and uiVis::uiMPEMan towards MPE::Horizon3DSeedPicker to get an idea on
what has to be done to achieve this.
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/19/2012 03:45 PM, David d'Angelo wrote:
> Hi folks,
>
> I am working on plugin, which connects the visualization of 2D seismic lines in
> OpendTect with Android tablets.
> Unfortunately, I face the following problems:
> 1) I need to get the image data out of the 2D Seismic lines. I used the visBase
> PlaneDataDisplay class to access the underlying:
> PlaneDataDisplay * pd = ...;
> SbVec3i32 size;
> int bytesPerPixel;
> unsigned char* data =
> pd->getChannels()->getChannels()->getValue(size,bytesPerPixel);
> I get the data, however the dimensions are looking strange. What format does the
> image have? 8bit grayscale?
> What is the recommended way to access the underlying data from 2D lines?
>
> 2) I want to be able to remotely add seed points for horizon tracking. Does
> anybody have an idea of how to do this without faking mouse events?
>
> Thanks in advance for any pointers.
>
> Cheers,
> David
>
>
More information about the Developers
mailing list