how to load Enhanced Multiframe Object with dcmtk?

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
bydoingbylearn
Posts: 29
Joined: Mon, 2010-08-16, 10:01
Location: CHINA

how to load Enhanced Multiframe Object with dcmtk?

#1 Post by bydoingbylearn »

Hi,
When I load a Enhanced Information Object Multiframe ,the computer was so slow? how to deal with this problem?
I use the loadfile() to load the Enhanced Multiframe Object ,and I want to know if there is other ways to load a large object.

The object's size was 234 M,and have 400 frames.

I would appreciate any help!

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#2 Post by Jörg Riesmeier »

What do you mean by "slow"? By default, large element values are not loaded, so the pixel data usually remains in file until it is accessed. See "maxReadLength" parameter of the loadFile() method.

In case you want to access (and possibly decompress) individual frames of the image, you might be interested in the following Howto.

bydoingbylearn
Posts: 29
Joined: Mon, 2010-08-16, 10:01
Location: CHINA

#3 Post by bydoingbylearn »

First, thanks for you help.
I have a short time to contact with dcmtk and I hope you can forgive my ignorant to it.

if I get DcmDataset and E_TransferSyntax, I can display the DICOM file.
if i use DicomImage("mf_image.dcm", CIF_UsePartialAccessToPixelData, 0, 10 /* fcount */),i don't know how to display it .

thanks!!

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#4 Post by Jörg Riesmeier »

In the documentation, there is an example on how to render the image to a pixel array.

bydoingbylearn
Posts: 29
Joined: Mon, 2010-08-16, 10:01
Location: CHINA

#5 Post by bydoingbylearn »

Yes ,In a short time ,I can display the object.
But there is other question,if I want load one of the frame, How do i set the parameters?
for example
if I want to load the 21st frame?
if I want to load the 21st to thirtieth?

Does it have good ways ?

thanks!!!

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#6 Post by Jörg Riesmeier »

Please check the parameters "fstart" and "fcount" of the DicomImage constructor in case you don't want to load all frames at the same time.
If you want to process all frames of the DICOM image successively, you should have a look at the above referenced "Howto".

bydoingbylearn
Posts: 29
Joined: Mon, 2010-08-16, 10:01
Location: CHINA

#7 Post by bydoingbylearn »

You are so kind, thank you!!

bydoingbylearn
Posts: 29
Joined: Mon, 2010-08-16, 10:01
Location: CHINA

#8 Post by bydoingbylearn »

Thanks for you help in thoes days ,With you help ,my work get a great progress,
But I want to ask you a question,When I display Enhanced Multiframe Objects ,if the number of frame less 100,It works well, but if the number>200 ,it can't work well.

So I want to know if the dcmtk can separate the Enhanced Multiframe Objects, or there is other ways to solve the problem.

I use the DicomImage("",CIF_UsePartialAccessToPixelData,count,count)
with the count change the screen changed;
thank you !!

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#9 Post by Jörg Riesmeier »

What is "count" in your sample code? Why don't you just follow what the referenced Howto shows?

bydoingbylearn
Posts: 29
Joined: Mon, 2010-08-16, 10:01
Location: CHINA

#10 Post by bydoingbylearn »

First ,forgive my long time didn't reply.

if I'm a doctor,and I want to look the designated frame,for example the twentieth, so the count is 20, and I use the DicomImage("mf_image.dcm", CIF_UsePartialAccessToPixelData, count,count) can solve this problem.

In some atricle,I know the large Enhanced Information Objects can be divided in to some parts , and I want to know how to?

thanks!!

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#11 Post by Jörg Riesmeier »

I was was asking what "count" is because you probably understood the API documentation wrong:

Code: Select all

fstart 	first frame to be processed (optional, 0 = 1st frame), all subsequent use of parameters labeled 'frame' in this class refers to this start frame.
fcount 	number of frames (optional, 0 = all frames)
So, in your example case the following would be correct:

Code: Select all

DicomImage("mf_image.dcm", CIF_UsePartialAccessToPixelData, count - 1 /*fstart*/, 1 /*fcount*/);
In some atricle,I know the large Enhanced Information Objects can be divided in to some parts , and I want to know how to?
You should probably read about "Concatenations" in the DICOM standard ...

bydoingbylearn
Posts: 29
Joined: Mon, 2010-08-16, 10:01
Location: CHINA

#12 Post by bydoingbylearn »

That is my mistake to set the parameter a wrong value , I'm so sorry!
DicomImage("", CIF_UsePartialAccessToPixelData, count, 1);

So this you may understand,the count is I want to display,everytime I just display 1 frame.

In this situation,if the amount of the frame > 200, to display the picture frame by frame was so slow,

I'm so sorry for my mistake!

Post Reply

Who is online

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