All other questions regarding DCMTK
Moderator: Moderator Team
buiductoan
Posts: 24 Joined: Thu, 2013-01-10, 16:40
#1
Post
by buiductoan » Fri, 2013-02-08, 09:56
I try to add dicom file in to dicom dir but not sucessful. I reference some topic in forum, and realize that some people has the same proplem. I have one dicom file in C disk that name is B. But the result is
Code: Select all
"checking file C:\B No such file or dicternary : reading file B ..."
This is my code. What is error?
Code: Select all
DicomDirInterface ddir;
const char *opt_output = DEFAULT_DICOMDIR_NAME;
const char *opt_fileset = DEFAULT_FILESETID;
const char *opt_descriptor = NULL;
const char *opt_charset = DEFAULT_DESCRIPTOR_CHARSET;
const char *opt_directory = "";
const char *opt_pattern = "";
DicomDirInterface::E_ApplicationProfile opt_profile = DicomDirInterface::AP_GeneralPurpose;
OFCondition status=ddir.createNewDicomDir(opt_profile, opt_output, opt_fileset);
//= ddir.createNewDicomDir(DicomDirInterface::AP_GeneralPurpose,"C:\DICOMDIR");
ddir.disableBackupMode();
ddir.disableConsistencyCheck();
ddir.enableMapFilenamesMode(OFFalse);
ddir.enableIconImageMode();
ddir.disableEncodingCheck();
ddir.disableResolutionCheck();
ddir.disableTransferSyntaxCheck();
ddir.setIconSize(128);
if (status.good())
{
ddir.setFilesetDescriptor("DICOMDIR");
status=ddir.addDicomFile("B","C:");
if(status.good())
{
status = ddir.writeDicomDir();
}
if (status.bad())
cout << "Error: cannot write DICOMDIR (" << status.text() << ")" << endl;
}
else
cout << "Error: cannot create DICOMDIR (" << status.text() << ")" << endl;
J. Riesmeier
DCMTK Developer
Posts: 2506 Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:
#2
Post
by J. Riesmeier » Fri, 2013-02-08, 15:31
Does dcmgpdir (from the command line) work? Is there any other log output?
buiductoan
Posts: 24 Joined: Thu, 2013-01-10, 16:40
#3
Post
by buiductoan » Sun, 2013-02-10, 16:30
I don't use command line, I use code to add dicom file in DIRDICOM. And this log is a result from below code. What was error in my code?
J. Riesmeier
DCMTK Developer
Posts: 2506 Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:
#4
Post
by J. Riesmeier » Sun, 2013-02-10, 20:34
Yes, I know because you've provided your source code in the first posting. My question was whether dcmgpdir works with the same input files, e.g. is there really a DICOM file "C:\B"?
buiductoan
Posts: 24 Joined: Thu, 2013-01-10, 16:40
#5
Post
by buiductoan » Mon, 2013-02-11, 02:58
Dear supporter, I have run sell with command.
In the case 001 is DICOM file in same folder with dcmgpdir.exe but the result is the same result of the my code. I am using DCMTK version 3.6.1. What is happend?
J. Riesmeier
DCMTK Developer
Posts: 2506 Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:
#6
Post
by J. Riesmeier » Thu, 2013-02-28, 21:49
And, what is the log output of dcmgpdir? It's really hard to get information out of you
Users browsing this forum: Ahrefs [Bot] , Bing [Bot] and 1 guest