// Should only contain one!
l = sh->GetFirstSingleSerieUIDFileSet();
+ if (l==NULL)
+ {
+ printf("EED GetXCoherentInfoGdcmReader::Process Warnning not coherent list/file \n");
+ return;
+ }
+
double zspacing = 0.;
sh->OrderFileList(l); // this one should compute the *actual* Z Spacing!
zspacing = sh->GetZSpacing();
for ( ; iitt != l->end(); ++iitt)
{
MapInfoDicom mapinfodicom;
-
for (iTag=0; iTag<sizeDicomTagsVector; iTag++)
{
key = bbGetInputDicomTags()[iTag];
// Read the *first* image file (a SET of file names is given as input)
gdcm::Reader *read = new gdcm::Reader();
reader->SetFileName( bbGetInputIn()[0].c_str() );
-
bool res = read->Read();
if ( !res )
{
return;
}
-
-
// Get info from the first image file
const gdcm::File &f = read->GetFile();
int i;
gdcm::Element<gdcm::VR::DS,gdcm::VM::VM6> iop;
iop.Read( ss );
for(i=0; i< 6; i++)
- {
+ {
v_iop.push_back((float)(iop[i]));
- }
+ }
bbSetOutputIOP(v_iop );
- std::vector<double> v_ipp;
+ std::vector<double> v_ipp;
const gdcm::DataElement &deIpp = f.GetDataSet().GetDataElement(gdcm::Tag((0x0020,0x0032)));
deIpp.GetValue().Print(ss);
gdcm::Element<gdcm::VR::DS,gdcm::VM::VM3> ipp;
ipp.Read( ss );
- for(i=0; i< 3; i++)
+ for(i=0; i< 3; i++)
{
v_ipp.push_back((float)(ipp[i]));
} // for 3
void GetXCoherentInfoGdcmReader::bbUserSetDefaultValues()
{
- reader=NULL;
+ reader=NULL;
std::vector<std::string> init;
init.push_back("");
bbSetInputIn(init);