~ubuntu-branches/ubuntu/trusty/ginkgocadx/trusty

« back to all changes in this revision

Viewing changes to src/cadxcore/main/gui/paneltags/paneltags.cpp

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2013-07-21 11:58:53 UTC
  • mfrom: (7.2.1 sid)
  • Revision ID: package-import@ubuntu.com-20130721115853-44e7n1xujqglu78e
Tags: 3.4.0.928.29+dfsg-1
* New upstream release [July 2013]
  + new B-D: "libjsoncpp-dev".
  + new patch "unbundle-libjsoncpp.patch" to avoid building bundled
    "libjsoncpp-dev".
  + new patch "fix-wx.patch" to avoid FTBFS due to missing
    "-lwx_gtk2u_html-2.8".
* Removed unnecessary versioned Build-Depends.
* Removed obsolete lintian override.
* Reference get-orig-source implementation for orig.tar clean-up and
  DFSG-repackaging.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
        patientGroup = NULL;
37
37
        identificationGroup = NULL;
38
38
        relationshipGroup = NULL;
 
39
        m_currentPath ="";
39
40
}
40
41
 
41
42
GNC::GUI::PanelTags::~PanelTags()
57
58
        }
58
59
}
59
60
 
60
 
void GNC::GUI::PanelTags::SetEstudio(GNC::GCS::Ptr<GNC::GCS::IStudyContext> pEstudio)
 
61
void GNC::GUI::PanelTags::SetView(GNC::GCS::IVista* pView)
61
62
{
62
 
        CreateCategories();
63
 
 
64
 
        if(!pEstudio.IsValid() || pEstudio->ActiveFileIndex < 0)
 
63
        if(pView == NULL || pView->GetCurrentDICOM() == "" || pView->GetCurrentDICOM() == m_currentPath)
65
64
        {               
66
65
                return;
67
66
        }
 
67
        CreateCategories();
 
68
        m_currentPath = pView->GetCurrentDICOM();
68
69
 
69
 
        GNC::GCS::Ptr<GIL::DICOM::TipoMetaInfo> info = pEstudio->GetMetaInfoActiveImage();
70
 
        GNC::GCS::Ptr<GIL::DICOM::DicomDataset> pJerarquia = pEstudio->GetTagsActiveImage();
 
70
        GIL::DICOM::TipoMetaInfo info;
 
71
        GIL::DICOM::DicomDataset base;
71
72
        
72
73
        GIL::DICOM::IDICOMManager*      pDICOMManager = GIL::DICOM::PACSController::Instance()->CrearInstanciaDeDICOMManager();
73
 
        
74
 
        if (info) {
75
 
                SetInfoTags(*info, pDICOMManager);
 
74
        try {
 
75
                pDICOMManager->CargarFichero(m_currentPath, base, false);
 
76
                pDICOMManager->CargarMetaInfo(m_currentPath, info);
 
77
        } catch (...) {
 
78
                LOG_ERROR("PanelTags", "Error loading path " + m_currentPath);
76
79
        }
77
80
        
78
 
        SetTags(*pJerarquia, m_pTags->GetRoot(), pDICOMManager);
 
81
        SetInfoTags(info, pDICOMManager);
 
82
        
 
83
        SetTags(base, m_pTags->GetRoot(), pDICOMManager);
79
84
        GIL::DICOM::PACSController::Instance()->LiberarInstanciaDeDICOMManager(pDICOMManager);
80
85
}
81
86
 
87
92
        if (paths.empty()) {
88
93
                return false;
89
94
        }
 
95
        m_currentPath = paths.front();
90
96
 
91
97
        GIL::DICOM::TipoMetaInfo info;
92
98
        GIL::DICOM::DicomDataset base;