Number of images in a DICOM file

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
islobell
Posts: 3
Joined: Fri, 2005-12-02, 19:12

Number of images in a DICOM file

#1 Post by islobell »

I'm using the following code to get the number of frames (images) in a DICOM file, and the result is always the same: Tag not Found.

OFCondition status = file.getDataset()->findAndGetLongInt(DCM_NumberOfFrames, nNumOfImages); //Tag not Found !!!

But if I use DcmImage class, it works !

DicomImage image(strDICOMFileName);
nNumOfImages = image.getFrameCount(); //It works !!!!

WHY?

Thanks.

mhavu
Posts: 15
Joined: Wed, 2005-11-23, 16:23
Location: Jyväskylä, Finland

#2 Post by mhavu »

What is the number of frames in this case? Single-frame images are not required to have this attribute. What does dcmdump say? Does the file have a Number of frames tag (0028,0008)?

- Marko

islobell
Posts: 3
Joined: Fri, 2005-12-02, 19:12

Number of images in a DICOM file

#3 Post by islobell »

Thanks, Marko !!!

Post Reply

Who is online

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