Saguenay (Jonquière), Québec, Canada. Tél: (581) 683-9887 Téléc: (581) 221-0874
RetourDCMTK
2008-01-22 14:51:29 (ID: 39, Parent: 33, Type: page)exmple d'utilisation de DCMTK
Voici un exemple de projet avec DCMTK Une classe d'interface a été réalisé nommé: dicom (fichiers dicom.cpp et dicom.h) Un programme d'exemple a été fait nommé test (test.cpp qui inclue dicom.h) exemple de Makefile à utiliser.. pour compiler ces fichiers avec dcmtk null#Makefile example for a project that use dcmtk librarie #Must set this var to the dcmtk root directory DCMTK_PATH = /home/jlcyr/yadis/dcmtk SHELL = /bin/sh VPATH = $(DCMTK_PATH)/apps/dcmdata/include:$(DCMTK_PATH)/config/include srcdir = . top_srcdir = $(DCMTK_PATH) configdir = $(DCMTK_PATH)/config include $(configdir)/Makefile.def ofstddir = $(top_srcdir)/ofstd LOCALINCLUDES = \ -I$(ofstddir)/include \ -I$(DCMTK_PATH)/dcmdata/include \ -I$(DCMTK_PATH)/dcmimgle/include \ -I$(DCMTK_PATH)/dcmimage/include LIBDIRS = \ -L$(ofstddir)/libsrc \ -L$(DCMTK_PATH)/dcmdata/libsrc \ -L$(DCMTK_PATH)/dcmimgle/libsrc \ -L$(DCMTK_PATH)/dcmimage/libsrc #NOTE: The include library order is IMPORTANT. LOCALLIBS = \ -ldcmimgle \ -ldcmdata \ -lofstd \ $(ZLIBLIBS) #add project files here objs = dicom.o test.o progs = dicom test support_lib = dcm2xml.dtd support_data = dumppat.txt all: $(progs) # Note: dcmftest does not need LOCALLIBS on most platforms, but on OSF1 it is required. test: test.o dicom.o $(CXX) $(CXXFLAGS) $(LDFLAGS) $(LIBDIRS) -o $@ $@.o dicom.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) dicom: dicom.o $(CXX) -c $(CXXFLAGS) $(LDFLAGS) $(LIBDIRS) -o $@ $@.o install: install-bin install-support install-bin: all $(configdir)/mkinstalldirs $(bindir) for prog in $(progs); do \ $(INSTALL_PROGRAM) $$prog$(BINEXT) $(bindir); strip $(bindir)/$$prog$(BINEXT) ;\ done install-support: $(configdir)/mkinstalldirs $(libdir) for file in $(support_lib); do \ $(INSTALL_DATA) $$file $(libdir) ;\ done $(configdir)/mkinstalldirs $(datadir) for file in $(support_data); do \ $(INSTALL_DATA) $$file $(datadir) ;\ done clean: rm -f $(objs) $(progs) $(TRASH) distclean: rm -f $(objs) $(progs) $(DISTTRASH) dependencies: $(CXX) -MM $(defines) $(includes) $(CPPFLAGS) $(CXXFLAGS) dicom.cpp test.cpp > $(DEP) include $(DEP)
Document Informatif
ADN Informatique
2015
Rev. 1
Jean-Luc Cyr