DICOM @ OFFIS

Discussion Forum for OFFIS DICOM Tools - For registration, send email with desired user name to the OFFIS DICOM team
It is currently Mon, 2017-12-18, 17:18

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon, 2017-11-20, 03:37 
Offline

Joined: Thu, 2009-03-19, 04:19
Posts: 80
In order to get some special frames of a large file, I used DcmDataset::chooseRepresentation, then DcmPixelData::getUncompressedFrame. But I didn' t want to decompress the whole file.
By the way, when decompressing large files, DcmDataset::chooseRepresentation sometimes failed, such as "Virtual Memory exhausted".
What shall I do then?


Top
 Profile  
 
PostPosted: Mon, 2017-11-20, 08:02 
Offline
DCMTK Developer

Joined: Tue, 2011-05-03, 14:38
Posts: 1882
Location: Oldenburg, Germany
Calling chooseRepresentation() with e.g. EXS_LittleEndianExplicit decompresses the entire pixel data of the dataset, so you should call getUncompressedFrame() only, which does exactly what you want.


Top
 Profile  
 
PostPosted: Tue, 2017-11-21, 02:55 
Offline

Joined: Thu, 2009-03-19, 04:19
Posts: 80
J. Riesmeier wrote:
which does exactly what you want


I want to save several frames of the large file into another file with the same transfer syntax as the original file.

So what i' ve done were:
1. Using the getUncompressedFrame to get the frames one by one.
2. Putting the frame datas into a buffer which was dynamically allocated before.
3. Using the putAndInsertUint8Array in order to put the frame datas into the dataset.
4. Calling the saveFile to impletement the last procedure.

But the file which was generated was abnormal(Its background was green!).The transfer syntax of the original file was EXS_JPEGProcess1.
I' m not good at image compressing. :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

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


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group