just create Dicomdir file.

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
jake
Posts: 2
Joined: Thu, 2016-11-10, 09:15

just create Dicomdir file.

#1 Post by jake »

hi there.
now I create dicomdir file by general sample
("The following example shows how to create a general purpose DICOMDIR from multiple files:") in homepage.

I have created dicomdir file by 'Kdicom library'. and I will make viewer by dicom toolkit.
By the way we must use viewer by 'Kdicom library' for some time. so I create dicomdir file separately by Dicom toolkit
because there is only exe file of viewer by Kdicom.
I know dicomdir is Dicom standard. so I sucess creation dicomdir file by Dicom toolkit.
but Viewer by Kdicom cannot load dicomdir file.

I want to know how to create dicomdir file and check point for creation dicomdir file concretely.

There is no error.

Please advise, thanks a lot!
====================================== fixed coding for test
DicomDirInterface dicomdir;
OFCondition status = dicomdir.createNewDicomDir(DicomDirInterface::/*AP_GeneralPurpose*/AP_DentalRadiograph,
"D:\\Projects\\Debug\\MODULE\\CDR\\DICOMDIR",
DEFAULT_FILESETID);
if (!status.good())
return false;

dicomdir.addDicomFile("I0000001", "D:\\Projects\\Debug\\MODULE\\CDR\\Image");
dicomdir.addDicomFile("I0000002", "D:\\Projects\\Debug\\MODULE\\CDR\\Image");
dicomdir.addDicomFile("I0000003", "D:\\Projects\\Debug\\MODULE\\CDR\\Image");
dicomdir.addDicomFile("I0000004", "D:\\Projects\\Debug\\MODULE\\CDR\\Image");

status = dicomdir.writeDicomDir();
======================================

J. Riesmeier
DCMTK Developer
Posts: 2504
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: just create Dicomdir file.

#2 Post by J. Riesmeier »

Are you sure that your DICOM viewer is a File-set Reader (FSR) for the "Dental Radiograph Interchange" Application Profile?
Have you checked the contents of the DICOMDIR file, e.g. using dcmdump from the DCMTK?

jake
Posts: 2
Joined: Thu, 2016-11-10, 09:15

Re: just create Dicomdir file.

#3 Post by jake »

sorry, my DICOM viewer is a File-set Reader (FSR) for the "AP_GeneralPurpose" Application Profile.


dicomdump.exe run -> result (theStatus = OF_ok(0))
==========================================================================
C:\dcmtk-3.6.0-win32-i386\bin>dcmdump.exe DICOMDIR

# Dicom-File-Format

# Dicom-Meta-Information-Header
# Used TransferSyntax: Little Endian Explicit
(0002,0000) UL 192 # 4, 1 FileMetaInformationGroupLength
(0002,0001) OB 00\01 # 2, 1 FileMetaInformationVersion
(0002,0002) UI =MediaStorageDirectoryStorage # 20, 1 MediaStorageSOPClassUID
(0002,0003) UI [1.2.276.0.7230010.3.1.4.2237138405.9484.1479113593.222] # 54, 1 MediaStorageSOPInstanceUID
(0002,0010) UI =LittleEndianExplicit # 20, 1 TransferSyntaxUID
(0002,0012) UI [1.2.276.0.7230010.3.0.3.6.1] # 28, 1 ImplementationClassUID
(0002,0013) SH [OFFIS_DCMTK_361] # 16, 1 ImplementationVersionName

# Dicom-Data-Set
# Used TransferSyntax: Little Endian Explicit
(0004,1130) CS [DCMTK_MEDIA_DEMO] # 16, 1 FileSetID
(0004,1200) up 0 # 4, 1 OffsetOfTheFirstDirectoryRecordOfTheRootDirectoryEntity
(0004,1202) up 0 # 4, 1 OffsetOfTheLastDirectoryRecordOfTheRootDirectoryEntity
(0004,1212) US 0 # 2, 1 FileSetConsistencyFlag
(0004,1220) SQ (Sequence with undefined length #=0) # u/l, 1 DirectoryRecordSequence
(fffe,e0dd) na (SequenceDelimitationItem) # 0, 0 SequenceDelimitationItem
==========================================================================

J. Riesmeier
DCMTK Developer
Posts: 2504
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: just create Dicomdir file.

#4 Post by J. Riesmeier »

Apparently, the DICOMDIR file is empty, or to be more precise: the DirectoryRecordSequence is empty.
I guess that your calls to addDicomFile() return an error. You should also check the returned OFCondition.
my DICOM viewer is a File-set Reader (FSR) for the "AP_GeneralPurpose" Application Profile.
Then, you should probably also generate a DICOMDIR for this Application Profile, right?

Post Reply

Who is online

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