[OpendTect_Developers] Body construction in OpendTect and related
Yuancheng Liu
yuancheng.liu at dgbes.com
Mon Jan 16 15:59:54 CET 2012
Dear all,
it is a very interesting and challenging topic for geoscientists to
extract geological bodies from seismic volumes, such as reservoir
bodies, salt bodies etc. In OpendTect, we have made some basic tools
available for users to play around. So, if you want to make some bodies
on your application, this post might save you some time.
We have two kinds of bodies available in our code. One is
MarchingCubes(wiki here <http://en.wikipedia.org/wiki/Marching_cubes>)
based bodies, such as iso-surfaces. Another one is Delaunay triangulated
bodies based on 3D points, such as polygon bodies, pick-set based
bodies. But if you want to display seismic data on those bodies, you
need to convert them into implicit bodies, which are implemented with
MarchingCubes. Here, an implicit body is a 3D cube data set filled with
-1, 0 1(or your threshold value with inside or outside values) and
constructed by Marching cubes.
Here is a simple case of how to make and store your geo-body.
|CubeSampling body_range;
/*Set this based on the required body boundary. */
mDeclareAndTryAlloc(Array3DImpl<float>*,arr,Array3DImpl<float>
(cs.nrInl(),cs.nrCrl(),cs.nrZ()) );
/*The arr is what you really have to calculate. First, you have to make
your geo-body either by triangulation or by any boundaries you may
apply. After you have you body shape, you need to set all the position
values based on your threshold, set negative value inside and positive
value outside and 0 on the body boundary.*/
RefMan<EM::MarchingCubesSurface> emcs = new
EM::MarchingCubesSurface(EM::EMM());
emcs->surface().setVolumeData( 0, 0, 0, *arr, 0, &taskrunner);
emcs->setInlSampling(SamplingData<int>(cs.hrg.start.inl,cs.hrg.step.inl));
emcs->setCrlSampling(SamplingData<int>(cs.hrg.start.crl,cs.hrg.step.crl));
emcs->setZSampling(SamplingData<float>(cs.zrg.start,cs.zrg.step));
emcs->setFullyLoaded( true );
emcs->setChangedFlag();
EM::EMM().addObject( emcs );
/*Now you may save the body the way you want.*/|
If you have any questions or suggestions on how to use or apply bodies,
please let me know.
Happy coding.
Yuancheng
--
-- dGB Earth Sciences
-- 1 Sugar Creek Center BLVD #935
-- Sugar Land, TX 77478; USA
-- Tel: +1 281-240-3939, Fax: +1 281-240-3944
-- (Skype) +1 281-968-0464
More information about the Developers
mailing list