[OpendTect_Developers] UTM to InlCrl

David d'Angelo david.d-angelo at iais.fraunhofer.de
Wed Nov 13 17:41:31 CET 2013


Hi folks,

just in case anybody is interested:
I added a the function (to Scene):
const mVisTrans* getInlCrlScaleTransform() const;
to get the scaleTransform. You can now use this function to convert utm 
to inlcrl coordinates:

Coord3 static utm2inlCrl(const Coord3& utm, const visSurvey::Scene* scene) {
         const mVisTrans* ic2disp = scene->getInlCrl2DisplayTransform();
         const mVisTrans* icscale = scene->getInlCrlScaleTransform();
         const mVisTrans* utm2disp = scene->getUTM2DisplayTransform();

         Coord3 disp;
         utm2disp->transform(utm,disp);
         Coord3 ic;
         ic2disp->transformBack(disp,ic);
         icscale->transformBack(ic,ic);

         return ic;
     }

Would you mind adding this function to the OD trunk?

Cheers,
David

On 13/11/13 15:58, David d'Angelo wrote:
> Hi folks,
>
> I am currently porting some plugins to the trunk version of OpendTect 
> (osg support).
> I ran into a problem converting coordinates between utm and inlcrl 
> coordinates. I used the following code to convert a utm coordinate 
> into inlcrl space:
>
> *Coord3 utm = ...
> const mVisTrans* ic2disp = scene->getInlCrl2DisplayTransform();**
> **const mVisTrans* utm2disp = scene->getUTM2DisplayTransform();**
> **Coord3 disp;**
> **utm2disp->transform(utm,disp);**
> **Coord3 ic;**
> **ic2disp->transformBack(disp,ic);*
>
> This code worked correctly with the Coin based version of OpendTect. 
> Unfortunately, this not the case anymore.
> What am I missing?
>
> Thanks and best regards,
> David
> -- 
> David d'Angelo, M. Sc.
> Adaptive Reflective Teams
> Fraunhofer IAIS
> Schloss Birlinghoven
> 53757 Sankt Augustin
> Germany
> Fon: +49 (0) 2241 14 3444
> Fax: +49 (0) 2241 14 2040


-- 
David d'Angelo, M. Sc.
Adaptive Reflective Teams
Fraunhofer IAIS
Schloss Birlinghoven
53757 Sankt Augustin
Germany
Fon: +49 (0) 2241 14 3444
Fax: +49 (0) 2241 14 2040

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opendtect.org/pipermail/developers/attachments/20131113/ba62abe4/attachment.html>


More information about the Developers mailing list