MCPcopy Create free account
hub / github.com/Kitware/VTK / SliceLocationCallback

Method SliceLocationCallback

Utilities/DICOMParser/DICOMAppHelper.cxx:512–535  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

510}
511
512void 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
537void DICOMAppHelper::ImagePositionPatientCallback(
538 DICOMParser* parser, doublebyte, doublebyte, DICOMParser::VRTypes, unsigned char* val, quadbyte)

Callers

nothing calls this directly

Calls 5

findMethod · 0.45
GetFileNameMethod · 0.45
endMethod · 0.45
valueMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected