| 345 | } |
| 346 | |
| 347 | void DICOMAppHelper::ArrayCallback(DICOMParser* parser, doublebyte group, doublebyte element, |
| 348 | DICOMParser::VRTypes datatype, unsigned char* val, quadbyte len) |
| 349 | { |
| 350 | const char* desc = "No description"; |
| 351 | |
| 352 | TagMapType::iterator iter = |
| 353 | this->Implementation->TagMap.find(std::pair<doublebyte, doublebyte>(group, element)); |
| 354 | if (iter != this->Implementation->TagMap.end()) |
| 355 | { |
| 356 | desc = (*iter).second.description; |
| 357 | } |
| 358 | |
| 359 | int t2 = (0x0000FF00 & datatype) >> 8; |
| 360 | int t1 = int((0x000000FF & datatype)); |
| 361 | |
| 362 | char ct2 = static_cast<char>(t2); |
| 363 | char ct1 = static_cast<char>(t1); |
| 364 | |
| 365 | *this->HeaderFile << "(0x"; |
| 366 | |
| 367 | this->HeaderFile->width(4); |
| 368 | char prev = this->HeaderFile->fill('0'); |
| 369 | |
| 370 | *this->HeaderFile << std::hex << group; |
| 371 | *this->HeaderFile << ",0x"; |
| 372 | |
| 373 | this->HeaderFile->width(4); |
| 374 | this->HeaderFile->fill('0'); |
| 375 | |
| 376 | *this->HeaderFile << std::hex << element; |
| 377 | *this->HeaderFile << ") "; |
| 378 | |
| 379 | this->HeaderFile->fill(prev); |
| 380 | *this->HeaderFile << std::dec; |
| 381 | *this->HeaderFile << " " << ct1 << ct2 << " "; |
| 382 | *this->HeaderFile << "[" << len << " bytes] "; |
| 383 | |
| 384 | *this->HeaderFile << desc << " : "; |
| 385 | |
| 386 | unsigned int uival = 0; |
| 387 | float fval = 0; |
| 388 | double dval = 0; |
| 389 | int ival = 0; |
| 390 | |
| 391 | if (val) |
| 392 | { |
| 393 | switch (datatype) |
| 394 | { |
| 395 | case DICOMParser::VR_AE: |
| 396 | case DICOMParser::VR_AS: |
| 397 | case DICOMParser::VR_CS: |
| 398 | case DICOMParser::VR_UI: |
| 399 | case DICOMParser::VR_DA: |
| 400 | case DICOMParser::VR_DS: |
| 401 | case DICOMParser::VR_DT: |
| 402 | case DICOMParser::VR_LO: |
| 403 | case DICOMParser::VR_LT: |
| 404 | case DICOMParser::VR_OB: // ordered bytes |
nothing calls this directly
no test coverage detected