#include <gdcmGlobal.h>
#include <gdcmDictSet.h>
-
namespace creaImageIO
{
// CTor
<<std::endl);
lv = 0;
- ownatt["FullFileName"] = "Full_File_Name";
+ ownatt["FullFileName"] = "Full_File_Name";
ownatt["FullFileDirectory"] = "Full_File_Directory";
// ATTRIBUTES
wxStaticText * GR=new wxStaticText(this,-1,_T(" DICOM Group: "), wxPoint(5,110));
- GRCtrl=new wxTextCtrl(this, ID_GR_CTRL,_T("0x0010"), wxPoint(82,110), wxSize(50,25));
+ GRCtrl=new wxTextCtrl(this, ID_GR_CTRL,_T("0x0010"), wxPoint(82,110), wxSize(50,25));
Connect( GRCtrl->GetId(), wxEVT_COMMAND_TEXT_UPDATED , (wxObjectEventFunction) &WxDescriptorPanel::OnDicomAttribute );
wxStaticText * EL=new wxStaticText(this,-1,_T(" DICOM Element: "), wxPoint(140,110));
wxButton *Cancel = new wxButton(this, wxID_CANCEL,_T("CANCEL"), wxPoint(250,480) );
// Connect( Cancel->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxCloseEvent) &wxWindow::Close );
- Layout();
+ Layout();
CreateDescriptor(0);
}
std::string name_att;
if (AttributeCombo->GetSelection() == 0)
{
- name_att = "D" + GRCtrl->GetValue() + "_" + ELCtrl->GetValue();
+ name_att = "D" + crea::wx2std(GRCtrl->GetValue()) + "_" + crea::wx2std(ELCtrl->GetValue());
}
else
- { wxString wd = AttributeCombo->GetValue();
- std::string st = crea::wx2std(wd);
- name_att = OwnAttribute(st);
+ {
+ wxString wd = AttributeCombo->GetValue();
+ std::string st = crea::wx2std(wd);
+ name_att = OwnAttribute(st);
}
onAddAttribute(crea::wx2std(AttributeCombo->GetValue()), name_att);
}
}
else
{
- if( !att.empty() )
+ if( !att.empty() )
{
// Find Name of level
if(level.empty())
else
{
ResultCtrl->SetInsertionPoint(InsertPt);
- for (int i = 1; i<=lv;i++)
+ for (int i = 1; i<=lv;i++)
{
- ResultCtrl->WriteText(" ");
+ ResultCtrl->WriteText(_T(" "));
}
- ResultCtrl->WriteText("| - ");
- ResultCtrl->WriteText(att);
+ ResultCtrl->WriteText(_T("| - "));
+ ResultCtrl->WriteText(crea::std2wx(att));
wxTextAttr ResultAttr(ResultCtrl->GetDefaultStyle());
ResultAttr.SetTextColour(*wxWHITE);
ResultCtrl->SetDefaultStyle(ResultAttr);
std::string text = " ";
- ResultCtrl->WriteText(" " + name_att);
+ ResultCtrl->WriteText(crea::std2wx(" " + name_att));
ResultAttr.SetTextColour(*wxBLACK);
ResultCtrl->SetDefaultStyle(ResultAttr);
- ResultCtrl->WriteText("\n");
+ ResultCtrl->WriteText(_T("\n"));
}
InsertPt = ResultCtrl->GetInsertionPoint();
}
//////////////////////////////////////////////////
void WxDescriptorPanel::onAddLevel(const std::string &level)
{
- if(addLevel(crea::wx2std(level)))
+ if(addLevel(level))
{
wxMessageBox(_T("Level already used"),crea::std2wx(("WARNING")),wxOK,this);
return;
ResultCtrl->SetInsertionPoint(InsertPt);
for (int i = 1; i<lv;i++)
{
- ResultCtrl->WriteText(" ");
+ ResultCtrl->WriteText(_T(" "));
}
if(lv>1)
- { ResultCtrl->WriteText("| \n");
+ { ResultCtrl->WriteText(_T("| \n"));
for (int i = 1; i<lv;i++)
{
- ResultCtrl->WriteText(" ");
+ ResultCtrl->WriteText(_T(" "));
}
- ResultCtrl->WriteText("|_");
+ ResultCtrl->WriteText(_T("|_"));
}
wxTextAttr ResultAttr(ResultCtrl->GetDefaultStyle());
ResultAttr.SetTextColour(*wxRED);
ResultCtrl->SetDefaultStyle(ResultAttr);
- ResultCtrl->WriteText(level);
+ ResultCtrl->WriteText(crea::std2wx(level));
ResultAttr.SetTextColour(*wxBLACK);
ResultCtrl->SetDefaultStyle(ResultAttr);
- ResultCtrl->WriteText("\n");
+ ResultCtrl->WriteText(_T("\n"));
InsertPt = ResultCtrl->GetInsertionPoint();
}
}
else
{
- level_pos_start += 2;
+ level_pos_start += 2;
}
std::string::size_type level_pos_end = tx.find_first_of("\n",level_pos_start);
else
{
wxString text = ResultCtrl->GetLineText(line);
- if ( text.Find("|_") == -1)
+ if ( text.Find(_T("|_")) == -1)
{
std::string level = findLevel();
// find GR and EL values to remove
else
{
RemoveLevel(crea::wx2std(text.AfterFirst('_')));
- lv = text.Find("|")/3;
+ lv = text.Find(_T("|"))/3;
pos_start= ResultCtrl->XYToPosition(0,line-1);
ResultCtrl->SetInsertionPointEnd();
pos_end = ResultCtrl->GetInsertionPoint();
}
}
- //////////////////////////////////////////////////////
- // create a descriptor structure //
- // @param name : level's name to add //
- // @return : boolean result //
+ //////////////////////////////////////////////
+ // create a descriptor structure //
+ // @param name : level's name to add //
+ // @return : boolean result //
//////////////////////////////////////////////////
void WxDescriptorPanel::CreateDescriptor(int type)
{
}
//////////////////////////////////////////////////
- // create a new descriptor //
- // @param event : WxEvent //
- // @return : - //
+ // create a new descriptor //
+ // @param event : WxEvent //
+ // @return : - //
//////////////////////////////////////////////////
void WxDescriptorPanel::OnNew(wxCommandEvent &Event)
{
}
//////////////////////////////////////////////////
- // Load a descriptor file //
- // @param event : WxEvent //
- // @return : - //
+ // Load a descriptor file //
+ // @param event : WxEvent //
+ // @return : - //
//////////////////////////////////////////////////
void WxDescriptorPanel::OnLoad(wxCommandEvent &Event)
{
//////////////////////////////////////////////////
// Save a descriptor //
// @param event : WxEvent //
- // @return : - //
+ // @return : - //
//////////////////////////////////////////////////
void WxDescriptorPanel::OnOK(wxCommandEvent &Event)
{
/////////////////////////////////////////////////////
// Save a descriptor and apply it (create a new DB//
- // @param event : WxEvent //
- // @return : - //
+ // @param event : WxEvent //
+ // @return : - //
/////////////////////////////////////////////////////
void WxDescriptorPanel::OnApply(wxCommandEvent &Event)
{
}
///////////////////////////////////////////////////////
- // Cancel action //
+ // Cancel action //
// @param event : WxEvent //
- // @return : - //
+ // @return : - //
///////////////////////////////////////////////////////
void WxDescriptorPanel::OnCancel(wxCommandEvent& event)
///////////////////////////////////////////////////////
// create a descriptor file //
- // @param - : //
- // @return : - //
+ // @param - : //
+ // @return : - //
///////////////////////////////////////////////////////
void WxDescriptorPanel::createDescriptorFile()
{