make dcmtk aware of new file in src/dcmdata/data

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
flyingmozart
Posts: 3
Joined: Fri, 2013-05-17, 12:38

make dcmtk aware of new file in src/dcmdata/data

#1 Post by flyingmozart »

Dear DCMTK members,

Within my project I am planning to extend DCMTK with an additional feature to burn text into an dicom image. The prototype is almost ready and I am planning to put the source online. However, I am still struggeling with some code-cosmetics :-)

I want to add a font (opensource font Lato-Regular.ttf) to my dcmtk-src/dcmdata/data directory. Within the code of my dcmtk-commandline-app, I need to set the path to the font. So far I only managed to set the path hardcoded (/Users/myName/development/dcmtk-src/dcmdata/data/Lato-Regular.ttf)

is there a way how to make dcmtk aware of the file so that it can be included without hardcoding the path? My app is more or less based on pdf2dcm.cc

edit:__
The Fontfile is already added to CMakeLists.txt, Makefile and Makefile.in in src/dcmdata/data

edit2:__
The Fontfile is installed into the install directory of install/share/dcmtk
How can this path be accessed from the app? is there a Macro or #define which stores the installpath/share/dcmtk pathinformation?

cheers
mozart

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

Re: make dcmtk aware of new file in src/dcmdata/data

#2 Post by J. Riesmeier »

What about the following macro/define from "dcmtk/config/osconfig.h":

Code: Select all

/* Define the default directory where support data files reside. */
#define DEFAULT_SUPPORT_DATA_DIR "/usr/local/share/dcmtk/"

flyingmozart
Posts: 3
Joined: Fri, 2013-05-17, 12:38

Re: make dcmtk aware of new file in src/dcmdata/data

#3 Post by flyingmozart »

Thank you very much, that did the job :)

Post Reply

Who is online

Users browsing this forum: Santhosh_M and 1 guest