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 » Fri, 2011-03-04, 01:42

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 » Fri, 2011-03-04, 12:01

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 » Mon, 2011-03-07, 03:33

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 » Mon, 2011-03-07, 08:48

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 » Mon, 2011-03-07, 12:18

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 » Mon, 2011-03-07, 12:45

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 » Tue, 2011-03-08, 08:23

You are so kind, thank you!!

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

#8 Post by bydoingbylearn » Thu, 2011-03-10, 14:17

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 » Thu, 2011-03-10, 18:40

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 » Mon, 2011-03-14, 03:49

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 » Mon, 2011-03-14, 09:05

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 » Wed, 2011-03-16, 02:23

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: Google [Bot] and 1 guest