~ubuntu-branches/ubuntu/wily/ginkgocadx/wily-proposed

« back to all changes in this revision

Viewing changes to src/visualizator/visualizator/wxvtk/gvistasimple.cpp

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2013-10-24 21:28:17 UTC
  • mfrom: (1.2.2)
  • Revision ID: package-import@ubuntu.com-20131024212817-ej1skb9og09d3ht6
Tags: 3.5.0.1137.31+dfsg-1
New upstream release [October 2013]

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 *  $Id: gvistasimple.cpp $
4
4
 *  Ginkgo CADx Project
5
5
 *
6
 
 *  Copyright 2008-12 MetaEmotion S.L. All rights reserved.
 
6
 *  Copyright 2008-14 MetaEmotion S.L. All rights reserved.
7
7
 *  http://ginkgo-cadx.com
8
8
 *
9
9
 *  This file is licensed under LGPL v3 license.
53
53
                return new GVtkObserver;
54
54
        }
55
55
 
56
 
        void Execute(vtkObject *   caller,
57
 
                                 unsigned long event,
58
 
                                 void *        callData)
 
56
        void Execute(vtkObject * caller, unsigned long event, void * /*callData*/)
59
57
        {
60
58
                if (IVista == NULL) {
61
59
                        return;
258
256
        return EstudioReferido;
259
257
}
260
258
 
261
 
void GVistaSimple::OnFocus(wxChildFocusEvent &event )
 
259
void GVistaSimple::OnFocus(wxChildFocusEvent& /*event*/)
262
260
{
263
261
        if (IVista != NULL) {
264
262
                IVista->OnFocus();
320
318
        }
321
319
}
322
320
 
323
 
void GVistaSimple::GoToSlice(int pos, bool relativa, bool propagar)
 
321
void GVistaSimple::GoToSlice(int pos, bool relativa, bool /*propagar*/)
324
322
{
325
323
        int posicion;
326
324
        if(relativa){
503
501
        return os.str();
504
502
}
505
503
 
506
 
std::string GVistaSimple::GetBottomRightAnnotation(GNC::GCS::Contexto3D* c) {
 
504
std::string GVistaSimple::GetBottomRightAnnotation(GNC::GCS::Contexto3D* /*c*/) {
507
505
        if (!this->ViewImage2D->IsInstalledAndInitialized() || IVista == NULL)
508
506
                return "";
509
507
 
550
548
        return os.str();
551
549
}
552
550
 
553
 
std::string GVistaSimple::GetPatientPosition(GNC::GCS::Contexto3D* c)
 
551
std::string GVistaSimple::GetPatientPosition(GNC::GCS::Contexto3D* /*c*/)
554
552
{
555
553
        return IVista->GetDICOMTagOriginal("0018|5100");
556
554
}
557
555
 
558
 
std::string GVistaSimple::GetAnotacionPosicion(GNC::GCS::Vector* pPosicion)
 
556
std::string GVistaSimple::GetAnotacionPosicion(const GNC::GCS::Vector3D& wP, GNC::GCS::Contexto3D* c)
559
557
{
560
558
        if (!this->ViewImage2D->IsInstalledAndInitialized() || IVista == NULL)
561
559
                return "";
565
563
        os.precision(2);
566
564
        os.fill('0');
567
565
 
568
 
        double ip[3] = {pPosicion->x, pPosicion->y, 0.0};
 
566
        double ip[3] = {0,0,0};
 
567
        c->pRenderer->m_pImageViewer->Proyect2D(wP.v, ip);
569
568
        int pp[3] = {0, 0, 0};
570
 
        double wp[3] = {0.0,0.0,0.0};
571
569
        int dims[3];
572
570
 
573
571
        ViewImage2D->GetDimensions(dims);
574
572
 
575
 
        ViewImage2D->CoordenadasImagenACoordenadasMundo(ip,wp);
576
 
 
577
 
 
578
 
        os << _Std("Position:") << " W:(" << wp[0] << ", " << wp[1] << "," << wp[2] << "); I:(" << pPosicion->x << ", " << pPosicion->y << ")";
 
573
 
 
574
        os << _Std("Position:") << " W:(" << wP.x << ", " << wP.y << "," << wP.z << "); I:(" << ip[0] << ", " << ip[1] << ")";
579
575
 
580
576
        //corregir de convención DICOM a convención vtk
581
577
 
654
650
}
655
651
 
656
652
//region "Interfaz de impresion de overlays de widgets"
657
 
void GVistaSimple::ImprimirOverlay(GNC::GCS::Widgets::IWidget* w, GNC::GCS::Contexto3D* c, GNC::GCS::Vector& boundingBox)
 
653
void GVistaSimple::ImprimirOverlay(GNC::GCS::Widgets::IWidget* w, GNC::GCS::Contexto3D* c, GNC::GCS::Vector& /*boundingBox*/)
658
654
{
659
655
        if (!w->EsMarcador()) {
660
656
                return;
948
944
        }
949
945
}
950
946
 
951
 
void GVistaSimple::ImprimirOverlay(GNC::GCS::Widgets::IWidgetBuilder* wb, GNC::GCS::Contexto3D* c, GNC::GCS::Vector& boundingBox)
 
947
void GVistaSimple::ImprimirOverlay(GNC::GCS::Widgets::IWidgetBuilder* /*wb*/, GNC::GCS::Contexto3D* /*c*/, GNC::GCS::Vector& /*boundingBox*/)
952
948
{
953
949
        //std::cout << "GVistaPASI::ImprimirOverlay() " << wb << std::endl;
954
950
}