}
else
{
- uint16_t gr;
uint16_t el;
+ uint16_t gr;
+
tree::AttributeDescriptor::GetDicomGroupElementFromKey(i->first,gr,el);
if ( ( gr!=0 ) && ( el!=0 ) )
{
- std::string val = file->GetEntryString(gr,el);
+ std::string val = file->GetEntryString(gr,el);
i->second = irclean(val);
}
}
}
}
- // file->Delete();
}
//=====================================================================
#include <gdcmSerieHelper.h>
#include <vtkGdcmReader.h>
namespace fs = boost::filesystem;
-
namespace creaImageIO
{
void GimmickView::ReadImagesNotThreaded(std::vector<vtkImageData*>& s, std::vector<std::string> im, int dimension)
{
mReader.Stop();
-
/* remember!
#define GIMMICK_NO_IMAGE_SELECTION 0
if ( (key.size()==10) &&
(key[0] == 'D') &&
(key[5] == '_') )
- {
+ {
std::string g = key.substr(1,4);
- sscanf(key.c_str(),"D %04x _ %04x ",&group,&elem);
- sscanf(g.c_str(),"%04x",&group);
- GimmickDebugMessage(3,"GetDicomGroupElementFromKey '"<<g<<"' : "
- <<group<<"|"<<elem<<std::endl);
+ std::string e = key.substr(6,4);
+ std::stringstream val;
+ val << std::dec << g.c_str() ;
+ val >> std::hex >> group;
+ val.clear();
+ val << std::dec << e.c_str();
+ val >> std::hex >> elem;
+ //sscanf_s(key.c_str(),"D%04x_%04x ",&group,&elem);
+ GimmickDebugMessage(3,"GetDicomGroupElementFromKey '"<<key<<"' : " <<group<<"|"<<elem<<std::endl);
}
else
{
//=====================================================================
VtkImageReader::~VtkImageReader()
{
- GimmickDebugMessage(5,"Destructing vtkImageReader : "<<GetName()
- <<std::endl);
+
mReader->Delete();
}
//=====================================================================