comparison Core/DicomParsing/ParsedDicomFile.cpp @ 3745:113a7b994a12

extracting the raw frame in the transcoder
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 12 Mar 2020 21:48:35 +0100
parents 2a170a8f1faf
children ba53d51ffa9a
comparison
equal deleted inserted replaced
3744:accf1b60b108 3745:113a7b994a12
1555 MimeType& mime, 1555 MimeType& mime,
1556 unsigned int frameId) 1556 unsigned int frameId)
1557 { 1557 {
1558 if (pimpl_->frameIndex_.get() == NULL) 1558 if (pimpl_->frameIndex_.get() == NULL)
1559 { 1559 {
1560 pimpl_->frameIndex_.reset(new DicomFrameIndex(*pimpl_->file_)); 1560 assert(pimpl_->file_ != NULL &&
1561 pimpl_->file_->getDataset() != NULL);
1562 pimpl_->frameIndex_.reset(new DicomFrameIndex(*pimpl_->file_->getDataset()));
1561 } 1563 }
1562 1564
1563 pimpl_->frameIndex_->GetRawFrame(target, frameId); 1565 pimpl_->frameIndex_->GetRawFrame(target, frameId);
1564 1566
1565 E_TransferSyntax transferSyntax = pimpl_->file_->getDataset()->getOriginalXfer(); 1567 E_TransferSyntax transferSyntax = pimpl_->file_->getDataset()->getOriginalXfer();
1587 } 1589 }
1588 1590
1589 1591
1590 unsigned int ParsedDicomFile::GetFramesCount() const 1592 unsigned int ParsedDicomFile::GetFramesCount() const
1591 { 1593 {
1592 return DicomFrameIndex::GetFramesCount(*pimpl_->file_); 1594 assert(pimpl_->file_ != NULL &&
1595 pimpl_->file_->getDataset() != NULL);
1596 return DicomFrameIndex::GetFramesCount(*pimpl_->file_->getDataset());
1593 } 1597 }
1594 1598
1595 1599
1596 void ParsedDicomFile::ChangeEncoding(Encoding target) 1600 void ParsedDicomFile::ChangeEncoding(Encoding target)
1597 { 1601 {