how to combine several JPEG files to converted into one dcm?

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
winstondcm
Posts: 31
Joined: Wed, 2010-03-24, 17:14

how to combine several JPEG files to converted into one dcm?

#1 Post by winstondcm »

hi, dcmtk team:

i want to save several jpeg files into one single multiframe dicom file, so each frame stores one jpeg file.. i don't want to decode the jpeg and put data then encode it...

should i use pixelsequence like this?

Code: Select all

DcmPixelSequence *sequence = new DcmPixelSequence(DcmTag(DCM_PixelData, EVR_OB)); 

   BYTE tmp; 
   for (int n=0; n<FrameCount; n++) 
   { 
      DcmPixelItem *newItem = new DcmPixelItem(DcmTag(DCM_Item, EVR_OB)); 
      if (newItem != NULL) 
      { 
         sequence->insert(newItem); 
         /* put pixel data into the item */ 
                    

         OFCondition res = dataset->putAndInsertUint8Array(DCM_PixelData, (Uint8 *)PixelData, nDataLength);  
      } 
   } 


should the nDataLength be one single jpeg file length?

thank you for your kindly advice.

winston

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest