Code: Select all
DcmFileFormat fileformat;
OFCondition cond=fileformat.loadFile(sFileName.GetBuffer(0),EXS_JPEGProcess1);
DcmPixelData *pPixData;
cond=pDataset->findAndGetElement(DCM_PixelData,(DcmElement *&)pPixData);
The second part:
Code: Select all
DcmPixelSequence *pSeq = NULL;
E_TransferSyntax xferSyntax = EXS_Unknown;
const DcmRepresentationParameter *rep = NULL;
cond=pPixData->getEncapsulatedRepresentation(xferSyntax, rep, pSeq);
The third part:
Code: Select all
DcmPixelItem *pItem;
cond=pSeq->getItem(pItem,j);
DcmPixelItem *pItemBk=(DcmPixelItem *)pItem->clone();
DcmPixelSequence *pNewSeq=new DcmPixelSequence(DCM_PixelData);
cond=pNewSeq->insert(pItemBk);
cond=pDataset->insert(pNewSeq,TRUE,TRUE);
These are all testing codes. What I hope to do are deleting some special frames in a large multiframe file and saving the rest into another file which has the same VR.