Hello,
I worked on sample test program on Linux platform to create the tractography result object using static method call
OFCondition result = TrcTractographyResults::create(id, contentDate, contentTime, equipment, refs, trc);
This method call failed with error message "Could not add references: No Study Instance UID specified for \"this\" object".
when I tested the same program on Windows machine, It works successfully. Is there any configuration settings required on Linux platform?
I have checked in DCMTK source, error message is thrown from the method IODCommonInstanceReferenceModule::addReferences while checking for 'ourStudy' string from the call
m_Item->findAndGetOFString(DCM_StudyInstanceUID, ourStudy);
Pls. provide your valuable hints for the problem.
Thanks
Manoj
Create call of Tractography Results object Failed
Moderator: Moderator Team
-
- DCMTK Developer
- Posts: 2505
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Create call of Tractography Results object Failed
Did you make sure that the (correct version of the) data dictionary is loaded by your program? On Windows systems, it is built into the EXE file (by default), so that might make the difference. See documentation for details: https://support.dcmtk.org/docs/file_datadict.html
Re: Create call of Tractography Results object Failed
Thanks a lot !!
It works after setting the environment variable "DCMDICTPATH" for external loading of DCM Data Dictionary on Linux platform. But, Why the default behavior on Linux platform is different from Windows Platform. I mean built-in DCM Data dictionary loaded on Windows platform while external DCM Data dictionary loading required on Linux platform.
Thanks
Manoj
It works after setting the environment variable "DCMDICTPATH" for external loading of DCM Data Dictionary on Linux platform. But, Why the default behavior on Linux platform is different from Windows Platform. I mean built-in DCM Data dictionary loaded on Windows platform while external DCM Data dictionary loading required on Linux platform.
Thanks
Manoj
-
- DCMTK Developer
- Posts: 2505
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Create call of Tractography Results object Failed
More than 25 years ago, DCMTK started on Unix systems only. Windows support was added a few years later. On Unix-style systems, it is quite common to load data such as the data dictionary at runtime because it avoids recompilation when the data needs to be updated. This "read-only architecture-independent data" is typically located in "/usr/local/share" + suffix such as "dcmtk", and this is also where the "dicom.dic" is installed when you call "make install" (without changing the the installation directories). So, after "make install" the DCMTK binaries in "/usr/local/bin" should be able to find the data dictionary automatically.But, Why the default behavior on Linux platform is different from Windows Platform. I mean built-in DCM Data dictionary loaded on Windows platform while external DCM Data dictionary loading required on Linux platform.
On Windows system, there is no directory scheme like "/usr/local" and, therefore, the default behavior is to build the data dictionary into the binaries. Also on Windows systems, users are used to copy the EXE files to their working directory and typically "forget" to also copy the supporting files (such as "dicom.dic").
By the way, all DCMTK command line tools check whether the data dictionary could be loaded, and I would recommend that you do the same:
Code: Select all
/* make sure data dictionary is loaded */
if (!dcmDataDict.isDictionaryLoaded())
{
OFLOG_WARN(dcmdumpLogger, "no data dictionary loaded, check environment variable: "
<< DCM_DICT_ENVIRONMENT_VARIABLE);
}
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest