| 510 | } |
| 511 | |
| 512 | void DICOMAppHelper::SliceLocationCallback( |
| 513 | DICOMParser* parser, doublebyte, doublebyte, DICOMParser::VRTypes, unsigned char* val, quadbyte) |
| 514 | { |
| 515 | // Look for the current file in the map of slice ordering data |
| 516 | std::map<std::string, DICOMOrderingElements, ltstdstr>::iterator it; |
| 517 | it = this->Implementation->SliceOrderingMap.find(parser->GetFileName()); |
| 518 | if (it == Implementation->SliceOrderingMap.end()) |
| 519 | { |
| 520 | // file not found, create a new entry |
| 521 | DICOMOrderingElements ord; |
| 522 | ord.SliceLocation = |
| 523 | vtk::scan_value<float>(std::string_view(reinterpret_cast<const char*>(val)))->value(); |
| 524 | |
| 525 | // insert into the map |
| 526 | this->Implementation->SliceOrderingMap.insert( |
| 527 | std::pair<const std::string, DICOMOrderingElements>(parser->GetFileName(), ord)); |
| 528 | } |
| 529 | else if (val) |
| 530 | { |
| 531 | // file found, add new values |
| 532 | (*it).second.SliceLocation = |
| 533 | vtk::scan_value<float>(std::string_view(reinterpret_cast<const char*>(val)))->value(); |
| 534 | } |
| 535 | } |
| 536 | |
| 537 | void DICOMAppHelper::ImagePositionPatientCallback( |
| 538 | DICOMParser* parser, doublebyte, doublebyte, DICOMParser::VRTypes, unsigned char* val, quadbyte) |
nothing calls this directly
no test coverage detected