+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+# pour la Santé)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+# This software is governed by the CeCILL-B license under French law and
+# abiding by the rules of distribution of free software. You can use,
+# modify and/ or redistribute the software under the terms of the CeCILL-B
+# license as circulated by CEA, CNRS and INRIA at the following URL
+# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+# or in the file LICENSE.txt.
+#
+# As a counterpart to the access to the source code and rights to copy,
+# modify and redistribute granted by the license, users are provided only
+# with a limited warranty and the software's author, the holder of the
+# economic rights, and the successive licensors have only limited
+# liability.
+#
+# The fact that you are presently reading this means that you have had
+# knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------
+*/
+
#include <creaImageIOWxTreeView.h>
#include <creaImageIOGimmickView.h>
-#include <creaImageIOSystem.h>
+
#include <wx/splitter.h>
#include <wx/gdicmn.h>
#include <boost/date_time/gregorian/gregorian.hpp>
wxMenuItem* m4Item=menuItem->Append(wxID_ANY, _T("&Display Dicom Tags"));
menuItem->AppendSubMenu(subExportMenu, wxT("&Export"));
-#if defined(USE_GDCM_ANOM)
+
wxMenuItem* m1Item=menuItem->Append(wxID_ANY, _T("&Anonymize"));
mAnonymizingID=m1Item->GetId();
- Connect( mAnonymizingID, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(WxTreeView::OnAnonymize) );
-#endif
+ Connect( mAnonymizingID, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(WxTreeView::OnAnonymizer) );
+
mLocalCopyID=m2Item->GetId();
mEditFieldID=m3Item->GetId();
mDumpID=m4Item->GetId();
wxLIST_STATE_SELECTED);
if ( item == -1 )
break;
- long adr = GetCtrl(l-1)->GetItemData(item);
+ long adr = (long)GetCtrl(l-1)->GetItemData(item);
tree::Node* n = ((ItemData*)adr)->node;
- if(mLastSelected==item)
+ /* FCY 18-04-2011: don't understand the real purpose of these lines,
+ if uncomment add last frame in first place
+ if(mLastSelected==item)
{
std::vector<tree::Node*>::iterator it;
it = sel.begin();
it = sel.insert ( it , n );
}
else
- {
+ {*/
sel.push_back(n);
- }
+ //}
}
/*int n = GetCtrl(l-1)->GetItemCount();
if ( it == -1 )
break;
- long adr = GetCtrl(level)->GetItemData(it);
+ long adr = (long)GetCtrl(level)->GetItemData(it);
tree::Node* nod = ((ItemData*)adr)->node;
att=(*nod).GetAttribute(mLevelList[level].key[mColumnSelected]);
wxBusyCursor busy;
std::vector<std::string> filesname;
std::vector<tree::Node*> nodes;
-// nodes.push_back(((ItemData*)GetCtrl(mLastRightLevel)->GetItemData(mLastRightSelected))->node);
+ nodes.push_back(((ItemData*)GetCtrl(mLastRightLevel)->GetItemData(mLastRightSelected))->node);
if(nodes.size() != 0)
{
GetFilenamesAsString(nodes,filesname);
- // GetGimmickView()->Anonymize(filesname,0);
+ GetGimmickView()->Anonymize(filesname,0);
}
}
if(sel.size()>1&&levelName.at(levelName.size()-1)!='s')
{
out<<" "<<levelName;
- out<<"s to .gimmick?";
+ out<<"s to .creaImageIO?";
}
else
{
- out<<" "<<GetTreeHandler()->GetTree().GetLevelDescriptor(mLastLevel).GetName()<<" to .gimmick?";
+ out<<" "<<GetTreeHandler()->GetTree().GetLevelDescriptor(mLastLevel).GetName()<<" to .creaImageIO?";
}
if (wxMessageBox(crea::std2wx(out.str()),
_T("Remove Files"),
GimmickDebugMessage(7,
"WxTreeView::ValidateSelectedImages"
<<std::endl);
- const std::vector<tree::Node*>& sel(GetSelected(mLevelList.size()+1));
+ const std::vector<tree::Node*>& sel(GetSelected((int)mLevelList.size()+1));
GetGimmickView()->OnSelectionChange(sel,
isSelection,(mLastSelected-1),
!mIgnoreSelectedChanged);
void WxTreeView::GetNodes(std::vector<tree::Node*>& nodes, bool direction)
{
long item = mLastSelected;
- int level=mLevelList.size()-1;
+ int level=(int)mLevelList.size()-1;
//Gets current item data
- long adr = GetCtrl(level)->GetItemData(item);
+ long adr = (long)GetCtrl(level)->GetItemData(item);
//Extracts the node
tree::Node* nod = ((ItemData*)adr)->node;
for ( ;; )
if(GetCtrl(level)->GetItemState(item, wxLIST_STATE_SELECTED)==0 )
{
- adr = GetCtrl(level)->GetItemData(item);
+ adr = (long)GetCtrl(level)->GetItemData(item);
nod = ((ItemData*)adr)->node;
nodes.push_back(nod);
}
// Should be in another place : not specific !
void WxTreeView::GetSelectedAsString(std::vector<std::string>&s)
{
- int level=mLevelList.size();
+ int level= (int)mLevelList.size();
const std::vector<tree::Node*>& sel=GetSelected(level+1);
std::vector<tree::Node*>::const_iterator i;
}
}
+
+
//================================================================
void WxTreeView::GetFilenamesAsString(const std::vector<tree::Node*>& nodes, std::vector<std::string>&s)
{
found=true;
}
}
-
return !found;
}
//================================================================
//================================================================
RemoveAlertDlg::RemoveAlertDlg(wxWindow *parent,
- wxString title,
- const wxSize& size)
+ wxString title,
+ const wxSize& size)
: wxDialog( parent,
wxID_ANY,
title,
//wxTextCtrl *text = new wxTextCtrl(this, wxID_ANY,crea::std2wx(out),wxDefaultPosition, wxSize(500,20));
wxTextCtrl *text = new wxTextCtrl(this, wxID_ANY,
_T("To reload deleted patient, you should synchronize your database before."),
- wxDefaultPosition, wxSize(500,20));
+ wxDefaultPosition, wxSize(650,20)); // 650 vs 500 ? // JPRx
mcheck = new wxCheckBox(this, 5478, _T("Do not display this warning again!"));
Connect( mcheck->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED , (wxObjectEventFunction) &RemoveAlertDlg::onCheck );
wxSizer* buttonsSizer = this->CreateSeparatedButtonSizer(wxOK|wxCANCEL);